How to change background color of a surf
48 views (last 30 days)
Show older comments
Carmine Buonagura
on 5 Oct 2020
Commented: Ameer Hamza
on 6 Oct 2020
Hello everyone, I have a surface obtained with the surf command. I would like to extract an image from it. In particular I would like to set a colored background, without the axis visible.
The only thing I know to achieve this stuff is:
surf(x,y,z)
view(2)
ax = gca; set(ax,'Color','k');
The problem is that if I remove the axis with:
ax.Visible = 'off'
the background color disappear.
I woould like to obtain the same image, without the axes.
2 Comments
Accepted Answer
Ameer Hamza
on 5 Oct 2020
Just turn the visibility of both axis off
ax.XAxis.Visible = 'off';
ax.YAxis.Visible = 'off';
6 Comments
More Answers (1)
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!