0
$\begingroup$

people!

I'm trying to create a table with eight different contour plots in 3D using the following code:

    Timing[Table[
    ContourPlot3D[
    Sqrt[4/(Pi)^2] Sin[m x] Sin[n y] Sin[l z], {x, 0, Pi}, {y, 0, 
    Pi}, {z, 0, Pi}, AxesLabel -> {x, y, z     } , 
    PlotLabel -> Row[{"m = ", m , " , n = ", n, " , l = ", l}], 
    Mesh -> None], {m , 2}, {n, 2}, {l, 2}]]

The problem is that the result yields a table in which appear planes in the contour plots that shouldn't be there. Image attached.

why these planes

How can I fix this?

$\endgroup$

1 Answer 1

3
$\begingroup$

The "planes" are contours. If you want only 2 contours you have to specify: Contours -> 2:

Table[ContourPlot3D[
  Sqrt[4/(Pi)^2] Sin[m x] Sin[n y] Sin[l z], {x, 0, Pi}, {y, 0, 
   Pi}, {z, 0, Pi}, AxesLabel -> {x, y, z}, 
  PlotLabel -> Row[{"m = ", m, " , n = ", n, " , l = ", l}], 
  Mesh -> None, Contours -> 2], {m, 2}, {n, 2}, {l, 2}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank u so much! $\endgroup$
    – Fermath
    Nov 17, 2021 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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