In surface(x,y,z) command what is the value of z that make the white color. I mean is there a color code for surface of surf

1 次查看(过去 30 天)
In surface(x,y,z) command what is the value of z that make the white color. I mean is there a color code for surface of surf

采纳的回答

Steven Lord
Steven Lord 2022-2-7
Many plotting functions interpret NaN in the data as "don't display anything."
[x, y, z] = peaks;
z(abs(z) < 1) = NaN; % Cut out everything between -1 and +1 on the Z axis
surface(x, y, z)
view(3)

更多回答(1 个)

Cristian Garcia Milan
Yes, there is. You have to use
surface(X,Y,Z,C)
You have to set the colours as you want, for example:
C(Z==z0,:) = [255,255,255];

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by