surf(x,y,z) where z is oscillatory. Therefore x,y are 100x100. I want the gridlines (don't want to use flat or interp options). However, too many gridlines don't look good. Looking for a way to reduce gridlines by 50% or 75% etc. in both x and y coord.
Asked
Active
Viewed 48 times
1 Answers
0
To supplement the comments, here's a quick demonstration of what's going on.
Code:
f = @(x,y) exp(-x.^2 - y.^2);
L = 2;
dx = .01;
dy = dx;
x = -L:dx:L;
y = x;
[X,Y] = meshgrid(x,y);
Z = f(X,Y);
tiledlayout(2,2);
nexttile
surf(X,Y,Z);
title('Default')
nexttile
surf(X,Y,Z,'EdgeAlpha',0.2)
title('EdgeAlpha = 0.2')
nexttile
surf(X,Y,Z,'LineStyle',':')
title('Line Style = :')
nexttile
surf(X,Y,Z,'LineStyle','-.')
title('Line Style = -.')
Ben Grossmann
- 225,327

surf(x,y,z,'EdgeAlpha',0.5). You could also change the grid color to gray instead of black. You could also change the edge style. – Ben Grossmann Dec 14 '21 at 00:00AlphaDataparameter. – Ben Grossmann Dec 14 '21 at 00:07