MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]大家帮我看一下啊,谢谢 (https://www.labfans.com/bbs/showthread.php?t=3311)

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

[SIZE="4"]axes[/SIZE] 函数命令我也是第一次碰到: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 的命令

[QUOTE=green0921;11480]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...[/QUOTE]


所有时间均为北京时间。现在的时间是 11:09

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.