For 3D surface plots, do you like the command, 'shading interp'?
24 views (last 30 days)
Show older comments
Hi there!
For 3D surface plots, do you like the command, 'shading interp'? When I use it, I notice that the color variation on the surface is quite smooth, with the faint lines that typically show the cross sections of the surface not visible anymore. However, I'm not sure that this is a good thing.
Thanks in advance,
0 Comments
Accepted Answer
Star Strider
on 6 Jan 2025
There are a few options that you can experiment with —
[X,Y] = ndgrid(-5:0.5:5);
Z = exp(-(X.^2 + Y.^2)/10);
figure
surf(X, Y, Z)
colormap(turbo)
title('Original')
figure
surf(X, Y, Z)
colormap(turbo)
shading('interp')
title('shading(''interp'')')
figure
surf(X, Y, Z, FaceColor='interp')
colormap(turbo)
title('FaceColor=''interp''')
figure
surf(X, Y, Z, EdgeColor='interp')
colormap(turbo)
title('EdgeColor=''interp''')
figure
surf(X, Y, Z, FaceColor='interp', EdgeColor='interp')
colormap(turbo)
title('FaceColor=''interp'', EdgeColor=''interp''')
.
4 Comments
More Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots 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!



