How to stop extraneous lines when using 'mesh'?
Show older comments
Hi,
I am having problems with the 'mesh' command (see picture below). The command is inserting lines that are not part of the surface under consideration (hyperbolic paraboloid in this case). Is there a way of stopping this happening?
Thanks
Nic

P. S. Interestingly when this is converted to a *.jpeg the extraneous lines disappear.
1 Comment
Star Strider
on 19 Mar 2014
Difficult to say without seeing the code you used to generate it.
Answers (2)
Mischa Kim
on 19 Mar 2014
Does this help?
x = -1:0.1:1;
y = -1:0.1:1;
[X,Y] = meshgrid(x,y);
Z = power(Y,2) - power(X,2) - 0.5;
mesh(X,Y,Z)
box
1 Comment
Mischa Kim
on 19 Mar 2014
OK. Try to see if changing the renderer does the trick:
set(gcf, 'Renderer', 'OpenGL');
or
set(gcf, 'Renderer', 'zbuffer');
Alternatively, check
set(gcf,'EdgeAlpha',0.99)
Nic Roberts
on 19 Mar 2014
Edited: Nic Roberts
on 19 Mar 2014
0 votes
Categories
Find more on Polygons 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!