green0921
2008-05-28, 15:04
figure(1)
ax1=axes('position',[0.1 0.1 0.8 0.8],'xcolor','r','ycolor','r');
ax2=axes('position',get(ax1,'position'),'XAxisLocation','top','yaxislocation','right','color','none');
axes(ax1);
t=0:pi/4:2*pi;
h1=plot(t,sin(t),':r');
box off;
axes(ax2);
h2=plot(t,3+t,'-k');
box off;
这段程序有什么问题啊,我是想得到两个坐标轴在一起的图,谢谢啊!
ax1=axes('position',[0.1 0.1 0.8 0.8],'xcolor','r','ycolor','r');
ax2=axes('position',get(ax1,'position'),'XAxisLocation','top','yaxislocation','right','color','none');
axes(ax1);
t=0:pi/4:2*pi;
h1=plot(t,sin(t),':r');
box off;
axes(ax2);
h2=plot(t,3+t,'-k');
box off;
这段程序有什么问题啊,我是想得到两个坐标轴在一起的图,谢谢啊!