surf plot grid line density
35 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi everybody,
I am trying to resolve this the last couple of days but no lack. I have a surf plot and I need to have a certain amount of points on it for detail. I need the surf plot to be red. No colormap. The grid because of resolution is making my plot totally black at points. And I can't see the details. Is there a way to make the grid less dense without decreasing the resolution of my data? Alternatively is there a way to use shading on the red surface plot to show the details of it?
Any help is appreciated, thanks
0 Commenti
Risposta accettata
Doug Hull
il 28 Set 2012
You seem to have learned how to turn off the gridlines. The best thing I can think to do is:
hold on
Then take a subset of your data (like every third column and third row or whatever. Then surf that, with color none for the facecolor. That should overlay a grid with less resolution.
Più risposte (1)
Sigfrid-Laurin Sindinger
il 1 Ott 2019
Hi,
the suggestion by Doug could look as follows (worked for me):
figure
S = surf(XX,YY,ZZ);
s.EdgeColor = 'none';
hold on
spacing = 40; % play around so it fits the size of your data set
for i = 1 : spacing : length(XX(:,1))
plot3(XX(:,i), YY(:,i), ZZ(:,i),'-k');
plot3(XX(:,i), YY(:,i), ZZ(:,i),'-k');
end
Best regards,
Sig
1 Commento
kevin cheng
il 7 Apr 2021
The second line in the for loop should read:
plot3(XX(i,:), YY(i,:), ZZ(i,:),'-k');
The grid pattern in this solution more closely follows the surface. The solution given by Doug may provide some clipping artifacts if the grid pattern spacing is too large.
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!