For 3D surface plots, do you like the command, 'shading interp'?

조회 수: 15 (최근 30일)
Noob
Noob 2025년 1월 5일
댓글: Star Strider 2025년 5월 3일
Hi there!
For 3D surface plots, do you like the command, 'shading interp'? When I use it, I notice that the color variation on the surface is quite smooth, with the faint lines that typically show the cross sections of the surface not visible anymore. However, I'm not sure that this is a good thing.
Thanks in advance,

채택된 답변

Star Strider
Star Strider 2025년 1월 6일
There are a few options that you can experiment with —
[X,Y] = ndgrid(-5:0.5:5);
Z = exp(-(X.^2 + Y.^2)/10);
figure
surf(X, Y, Z)
colormap(turbo)
title('Original')
figure
surf(X, Y, Z)
colormap(turbo)
shading('interp')
title('shading(''interp'')')
figure
surf(X, Y, Z, FaceColor='interp')
colormap(turbo)
title('FaceColor=''interp''')
figure
surf(X, Y, Z, EdgeColor='interp')
colormap(turbo)
title('EdgeColor=''interp''')
figure
surf(X, Y, Z, FaceColor='interp', EdgeColor='interp')
colormap(turbo)
title('FaceColor=''interp'', EdgeColor=''interp''')
.
  댓글 수: 4
Noob
Noob 2025년 5월 3일
Hi Star Strider!
Thanks so much! It's been so long since I worked on this! I abandoned this 3D surface plot altogether, a while back, and focused on some good 2D figures instead -- which got really good, I think. Hopefully at some point in the near future, I'll start work again on a surface plot.
Talk soon and take care!
Star Strider
Star Strider 2025년 5월 3일
As always, my pleasure!
I'll help with the surface plots if necessary.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by