Mesh plot with only every nth line plotted?
Show older comments
Hello,
is it possible to reduce the number of plotted lines in a mesh-plot without loss of accuracy? I know, I can reduce the number of data points. But in this case the accuracy of the mesh-plot gets quite bad (see exsample below). Is there any way to say "mesh" to show only every nth line of the wireframe?
% [Matlab]
[DataX,DataY,DataZ] = peaks(100);
subplot(1,2,1);
mesh(DataX,DataY,DataZ,'EdgeColor','k');
subplot(1,2,2);
mesh(DataX(1:10:end,1:10:end),DataY(1:10:end,1:10:end),...
DataZ(1:10:end,1:10:end),'EdgeColor','k');
% [/Matlab]

Best regards
Guido
[Edit] Really bad mistake in writing corrected. [/Edit]
Accepted Answer
More Answers (1)
Thorsten
on 10 Oct 2014
0 votes
If you reduce the number of lines the plot will usually be less accurate, unless in special cases where you have, e.g., a plane. The only thing you can do is to find a compromise between accuracy and line number that fits your needs.
Categories
Find more on Correlation and Convolution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!