How do I get rid of grid lines on a surface plot?

I used the surface function to generate the surface plot below. How do I get rid of the gris lines around the cells?

Answers (1)

Use 'EdgeColor','none' or 'LineStyle','none'
z = peaks(100);
figure
surface(z) % with grids
figure
surface(z,'EdgeColor','none')
view(2)
figure
surface(z,'LineStyle','none')
view(2)

2 Comments

You're welcome! Any questions, let me know. Otherwise, please "Accept" this answer. Thanks!

Sign in to comment.

Categories

Products

Release

R2023b

Asked:

on 13 Mar 2024

Commented:

on 13 Mar 2024

Community Treasure Hunt

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

Start Hunting!