Colors 如何在scilab中使用plot3d获取热色?
您好,这似乎是一个简单的问题,但我很难理解如何在plot3d中使用颜色 这就是我所拥有的:Colors 如何在scilab中使用plot3d获取热色?,colors,plot,scilab,altitude,mplot3d,Colors,Plot,Scilab,Altitude,Mplot3d,您好,这似乎是一个简单的问题,但我很难理解如何在plot3d中使用颜色 这就是我所拥有的: // x, y and z are matrix 4 by 100 myColors = ones(1,size(z,2)); plot3d(x,y,list(z,myColors),alpha=0,theta=270); 我想要与z高度相关的颜色 代码 如果我理解正确的x,y和z是这样的: x = [ 1:100 ]; y = [ 1:4 ]; z = rand( length(x), lengt
// x, y and z are matrix 4 by 100
myColors = ones(1,size(z,2));
plot3d(x,y,list(z,myColors),alpha=0,theta=270);
我想要与z高度相关的颜色 代码
如果我理解正确的x,y和z是这样的:
x = [ 1:100 ];
y = [ 1:4 ];
z = rand( length(x), length(y) ); //Some function resulting in (100 x 4) matrix
然后可以使用以下代码绘制它
plot3d( x, y, z, alpha=0, theta=270);
e = gce(); // Get current entity handle.
e.color_flag = 1; // Color according to z
f = gcf(); // Get current figure handle.
f.color_map = hotcolormap(512); // Make it a heat color map
文件
根据和,颜色标志
可用于:
颜色\u标志:此字段用于指定用于设置面颜色的算法
请注意,有关颜色模式、前景和隐藏颜色的规则如下
仍然适用于本案
颜色标志==1
所有面都使用一个颜色索引绘制,每个面与
Z最小z值使用索引1颜色绘制,而
使用最高颜色索引绘制最大z值。边缘
根据颜色模式的值,可以额外绘制面
(见上文)
结果图像