surf plot grid line density

36 次查看(过去 30 天)
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?
here is a link of one plot using a grid and one without. None of them is good enough: Image
Any help is appreciated, thanks

采纳的回答

Doug Hull
Doug Hull 2012-9-28
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.

更多回答(1 个)

Sigfrid-Laurin Sindinger
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 个评论
kevin cheng
kevin cheng 2021-4-7
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by