20
$\begingroup$

From reading the documentation, it seems that ListContourPlot3D should work equally well on an array versus a list of tuples,

?ListContourPlot3D

ListContourPlot3D[array] generates a contour plot from a three-dimensional array of values. ListContourPlot3D[{{$x_1$,$y_1$,$z_1$,$f_1$},{$x_2$,$y_2$,$z_2$,$f_2$},$\ldots$}] generates a contour plot from values defined at specified points in three-dimensional space.

But below the plot on the left uses the tuples version while the plot on the right uses the array,

dta = Table[{x, y, z, x^3 + y^2 - z^2}, {z, -2, 2, .1}, {y, -2, 
    2, .1}, {x, -2, 2, .1}];
Grid[{{ListContourPlot3D[Flatten[dta, 2], Contours -> {0}, 
    Mesh -> None],
   ListContourPlot3D[dta[[All, All, All, -1]], Contours -> {0}, 
    Mesh -> None, DataRange -> {#, #, #} &@{-2, 2}]}}]

enter image description here

The interpolation used for the array version is clearly superior. Why is this? InterpolationOrder is not an option for ListContourPlot3D (even an undocumented one). Applying the option MaxPlotPoints -> 120 produces this monstrosity

enter image description here

This problem seems to affect the output of ListContourPlot a little bit differently. Without using InterpolationOrder, they give the same output (top row below), but if I do use InterpolationOrder, it only has an effect on the array, not the tuples.

dta = Table[{x, y, x^3 + y^2}, {y, -2, 2, .2}, {x, -2, 2, .2}];
Grid[{{ListContourPlot[Flatten[dta, 1], Contours -> 20],
   ListContourPlot[dta[[All, All, -1]], Contours -> 20]},
  {ListContourPlot[Flatten[dta, 1], Contours -> 20, 
    InterpolationOrder -> 3],
   ListContourPlot[dta[[All, All, -1]], Contours -> 20, 
    InterpolationOrder -> 3]}}]

enter image description here

$\endgroup$
  • $\begingroup$ According to the ListContourPlot/3D docs, there is a Method option which seems to deal with that problem ("the method to use for interpolation and data reduction") but no examples are available at all in the Options section ! I couldn't make it work, setting it with various def. $\endgroup$ – SquareOne Oct 29 '15 at 11:19
  • $\begingroup$ Interesting, looks like Szabolcs made a post about that, but got no answer yet. Also, anyone else find that Wolfram Community website has been insanely slow lately? Unusable sometimes. $\endgroup$ – Jason B. Oct 29 '15 at 11:25

Your Answer

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

Browse other questions tagged or ask your own question.