如何改变八度的plot3颜色?

时间:2013-06-28 21:09:24

标签: 3d plot octave

我试图在一个图上绘制三个系列的3D数据。我需要使用颜色,即使以灰度打印的绘图也是可读的。我不能用八度音阶来显示我选择的颜色。我试过像'-r'这样的格式字符串,我尝试在plot3命令中设置名称 - 值对,并尝试使用set with plot命令返回的句柄。

这是一个最小的工作示例:

t=0:0.01:10;

x1=sin(t);
y1=cos(t);

x2=sin(2*t);
y2=cos(2*t);

x3=t.*sin(t);
y3=t.*cos(t);
figure;
clf;
hold on;
plot3(x1,y1,t,'-b','lineWidth',1);
plot3(x2,y2,t,'-r','lineWidth',3);
plot3(x3,y3,t,'-k','lineWidth',5);

xlabel('x');
ylabel('y');
zlabel('t');

legend(' sin(t) cos(t)','sin(2t) cos(2t)','t*sin(t) t*cos(t)');
print('-dpng','sweetSOExample.png');

Plot from the example script

0 个答案:

没有答案