I was trying to draw a simple surface and ended up with some modern art... if we start with a surface defined by a Gaussian shape and plot it, all looks well:

surf = GaussianMatrix[{100, 10}];

enter image description here

But if I try to plot the closely related 1-surf, some weird things happen:

ListPlot3D[1 - surf]

enter image description here

Rotating the image with my mouse gives:

enter image description here

I guess I'm wondering if there is something strange/iodiosyncratic about my setup or if this is generic...

  • $\begingroup$ What does surf look like if you give the vertical a range of 0 to 1? Maybe you can gather something from that? $\endgroup$ – CA Trevillian Jul 1 '20 at 14:17
  • 3
    $\begingroup$ It's modern art for sure. Setting PlotRange -> Full resolves the issue, so I think the problem lies in the code that selects the plot range automatically. There's something with the value range that it doesn't like. $\endgroup$ – C. E. Jul 1 '20 at 14:35

You have too many 1.'s, I guess, and the automatic plot range is too small.

ListPlot3D[1 - surf, PlotRange -> 1 - MinMax[surf]]

enter image description here

More than half of the entries of 1 - surf are 1.:

1 - surf;
Count[Flatten@%, 1.]

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.