How to draw a surface plot without black edges in MATLAB?

Viewed 100117

The black lines are awful, how can I get rid of them? I want only the colored surfaces.

4 Answers

Another choice is to set the edgeColor and/or lineStyle properties of the surface handle object to none.

>> hSurf = surf(X,Y,Z,'EdgeColor','none','LineStyle','none','FaceLighting','phong');

The shading command is your friend:

shading flat - gives you the surface without mesh lines

shading interp - interpolates colours between patches to give a smooth finish

shading faceted - gives you the surface with black mesh lines (similar to flat)

I believe shading interp is the one you're looking for.

Related