Regarding 3d plot color
1 view (last 30 days)
Show older comments
I am trying to plot a 3d plot using surface function.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/923569/image.png)
How can I change the color of the plot?
0 Comments
Accepted Answer
More Answers (1)
Cris LaPierre
on 11 Mar 2022
The spacing between your values is so small that all you are seeing here is the EdgeColor. Try setting the color to 'none' and see if what you get is more like what you expected.
[X,Y] = meshgrid(-5:.5:5);
Z = Y.*sin(X) - X.*cos(Y);
surface(X,Y,Z);
view(3)
% with no EdgeColor
figure
surface(X,Y,Z,'EdgeColor','none');
view(3)
0 Comments
See Also
Categories
Find more on 2-D and 3-D 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!