Blank faces in surface plot
2 views (last 30 days)
Show older comments
Hi,
I have non-uniformly spaced data and am using meshgrid, griddata & surf to obtain a surface plot. Since my data has discontinuities, I would like to have the plot show an empty face corresponding to those coordinates. Is there a way to do that? My current code is as below:
xlin = linspace(min(x),max(x),300);
ylin = linspace(min(y),max(y),150);
[X,Y] = meshgrid(xlin,ylin);
Z = griddata(x,y,z,X,Y,'cubic');
figure;
surf(X,Y,Z);
Discontinuities in my function values (z) are represented by NaN. For eg. at x = 1650, y = 150, z is set as NaN to represent a discontinuity.
Thanks!
0 Comments
Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!