登录论坛

查看完整版本 : [求助]大家帮我看一下啊,谢谢


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;

这段程序有什么问题啊,我是想得到两个坐标轴在一起的图,谢谢啊!

fanxing39
2008-05-29, 01:37
axes 函数命令我也是第一次碰到:lovely:
你找下 matlab图像处理的书籍找找 ? :eek: :eek:

fetsh
2008-05-29, 11:33
t=0:pi/4:2*pi;
figure,plot(t,sin(t),':r');
hold on
plot(t,3+t,'-k');
就行了。

dahonglong
2008-05-29, 15:34
在一个图的基础上再画一个图,需要用hold on 的命令

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','yaxisloca...