3
$\begingroup$

I'd like to get separate plots for the functions in a list, and I'm trying the following, which doesn't work. What is the correct way to do that?

Table[ContourPlot3D[f, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}], {f, {x + y + z + x y z == 0, x + y + z^2 + x y z^2 == 0, x + y^2 + z + x y^2 z == 0}}]
$\endgroup$
5
$\begingroup$
Table[ContourPlot3D[
  Evaluate[f], {x, -2, 2}, {y, -2, 2}, {z, -2, 
   2}], {f, {x + y + z + x y z == 0, x + y + z^2 + x y z^2 == 0, 
   x + y^2 + z + x y^2 z == 0}}]

Just add Evaluate

$\endgroup$
2
$\begingroup$

Instead of Table you could use Map

ContourPlot3D[#, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}] & /@ {x + y + z + x y z == 0, x + y + z^2 + x y z^2 == 0, x + y^2 + z + x y^2 z == 0}
$\endgroup$
2
$\begingroup$

Using Table

Table[ContourPlot3D[
  Evaluate@f, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}], {f, {x + y + z + x y z == 0,
    x + y + z^2 + x y z^2 == 0, x + y^2 + z + x y^2 z == 0}}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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