X Y grids on 2D surface plot

9 views (last 30 days)
Toufik
Toufik on 6 Dec 2019
Commented: Star Strider on 7 Dec 2019
I'm facing problem in making visible the grids for the x and y axis.
Her is a simple exemple:
[X,Y,Z] = peaks(25);
surf(X,Y,Z)
shading interp;
grid on
view(2)
Please, any help?

Accepted Answer

Star Strider
Star Strider on 6 Dec 2019
If you want to see the grid lines, do not use shading interp
Just do:
[X,Y,Z] = peaks(25);
figure
surf(X, Y, Z)
grid on
view(2)
and the grid lines will be visible,.
  4 Comments
Toufik
Toufik on 7 Dec 2019
Thank you very much, it works like that.
Star Strider
Star Strider on 7 Dec 2019
As always, my pleasure!

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!