Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Possible Duplicate:
Difference in Plot when using Evaluate vs when not using Evaluate
Why do I have to put Evaluate[] here
Why is ContourPlot not displaying this curve?

Why is nothing (empty plot, without error) plotted, when using the following code?

 tab = Table[x^2 + y^2 == R, {R, 0.2, 1, 0.2}];
 ContourPlot[tab, {x, -1, 1}, {y, -1, 1}]

Thank you for your help!

share|improve this question
add comment

marked as duplicate by rm -rf, Mr.Wizard Aug 30 '12 at 18:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

up vote 7 down vote accepted

You need:

ContourPlot[Evaluate@tab, {x, -1, 1}, {y, -1, 1}]

enter image description here

share|improve this answer
add comment

You want to plot the contours of a list of equations. The list of function is

{x^2 + y^2 == 0.2, x^2 + y^2 == 0.4, x^2 + y^2 == 0.6, x^2 + y^2 == 0.8, x^2 + y^2 == 1.}

With one equation you can use simply

 ContourPlot[x^2 + y^2 == 0.2, {x, 0, 1}, {y, 0, 1}]

With two equations you can use a list as argument of CountourPlot

ContourPlot[{x^2 + y^2 == 0.2, x^2 + y^2 == 0.4}, {x, 0, 1}, {y, 0, 1}]

To use your table, try

ContourPlot[tab // Evaluate, {x, -1, 1}, {y, -1, 1}]

enter image description here

share|improve this answer
add comment

You have to use Evaluate here. The reason for this is that ContourPlot has the attribute of "HoldAll".

Attributes@ContourPlot
{HoldAll, Protected}
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.