How can I stop ListPlot3D from drawing segments between data points that differ by a certain threshold? In my example these far separated data points correspond to data samples either side of a discontinuity.

This question is a natural extension of the question here for ListPlot, and may well be a trivial extension for those who know what they're doing. Or perhaps not.

Here is an example:

r = x^2 + y^2;
data = Table[r Tan[r], {x, -2, 2, 0.01}, {y, -2, 2, 0.01}];
ListPlot3D[data, ClippingStyle -> None]

I appreciate that here we can split the plotting into two different regions before and after the discontinuity in Tan, but in the general case this is not so easy.

share|improve this question
    
I tag @corey979, the accepted answerer from the previous question, but with no implied obligation! – Tom 2 hours ago

I suppose you could pick a plot range (perhaps from a test plot) and use RegionFunction to enforce it:

ListPlot3D[data, ClippingStyle -> None, 
 RegionFunction -> Function[{x, y, z}, -11 < z < 12]]

Mathematica graphics

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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