明月水轩 发表于 2006-11-25 00:45

请教高手如何在plotyy函数中设置线型,颜色

想在plotyy函数所作图中,达到plot那种效果,可以用'*'‘x’等标记数据点。
用set怎么搞?

xjzuo 发表于 2006-11-25 09:31

回复

建议找一本书看看set对于图形对象的用法.

先可以看看Matlab附带的例子:
%%%%%%%%%%%%%%%%%%%%
x = 0:0.01:20;
y1 = 200*exp(-0.05*x).*sin(x);
y2 = 0.8*exp(-0.5*x).*sin(10*x);
= plotyy(x,y1,x,y2,'plot');
set(get(AX(1),'Ylabel'),'String','Left Y-axis')
set(get(AX(2),'Ylabel'),'String','Right Y-axis')
set(H1,'LineStyle','--')
set(H2,'LineStyle',':')
%%%%%%%%%%%%%%%%%%%%%
页: [1]
查看完整版本: 请教高手如何在plotyy函数中设置线型,颜色