cc2005726 发表于 2009-9-15 17:11

axis equal和DataAspectRatio的区别?

axis equal是将定标因子设成相等,和set(gca,'DataAspectRatio', )这一句相比,有什么区别吗?
我自己试了下:t=0:0.1:6;plot(t,sin(t)+tan(t))
                        axis equal
如下面的左图,
t=0:0.1:6;plot(t,sin(t)+tan(t))
>> set(gca,'DataAspectRatio', )
结果如下面右图

[ 本帖最后由 cc2005726 于 2009-9-15 17:12 编辑 ]

ChaChing 发表于 2009-9-16 00:49

楼主不是试出来了吗!?

cc2005726 发表于 2009-9-16 09:25

回复 沙发 ChaChing 的帖子

呵呵,咋天就是觉得自己没看出什么区别,但不能确定所以发帖问下子。
今天有一个新的想法:
    axis equal这一句没有改变DataAspectRatioMode的默认属性:auto,所以MATLAB stretches the axes to fill the axes position rectangle (the rectangle defined by the last two elements in the Position property). This results in graphs that use the available space in the rectangle
   set(gca,'DataAspectRatio', )这一句实际上已经把'DataAspectRatioMode设成了manual,所以整个坐标系的范围就变小了

[ 本帖最后由 cc2005726 于 2009-9-16 10:56 编辑 ]

spwbaha 发表于 2010-10-1 14:56

顶顶{:{44}:}
页: [1]
查看完整版本: axis equal和DataAspectRatio的区别?