【Matlab】关于Position与OuterPosition属性的区别(转)
(2013-03-25 08:27:23)分类: MATLAB |
设置figure位置scrsz
= get(0,'ScreenSize');%显示电脑的分辨率,我的电脑1280*800,则scrsz
=
[1 1 1280 800]
ScreenSize is
设置figure的大小为1/4显示器大小并置于左上方
figure('Position',[1 scrsz(4)/2 scrsz(3)/2 scrsz(4)/2])Figure
OuterPosition属性包括title bar, menu bar, tool bars, and outer
edges.
Figure Position属性不包括title bar, menu bar, tool bars, and outer
edges
set(0,'HideUndocumented','off')
>> get(gcf)
...
Position = [360 278 560 420]
...
OuterPosition = [352 270 576 511]
...
设置坐标轴的位置Axes的OuterPositio属性包括axis labels, title, and a
margin,对于只有一个axes对象的figure,就是figure的内部
Axes的Position属性就是axes的边界以内不包括the tick marks and labels, title, and
axis labels
Axesde TightInset属性就是axes的text labels, title, and axis
labels.和axes边界之间的空白距离
set(gco,'Units','pixels')
get(gco)
...
OuterPosition = [1 1 560 420]
...
Position = [73.8 47.2 434 342.3]
...
TightInset = [22 17 5 8]