matlab figure 窗口最大化
http://blog.163.com/yinhexiwen@126/blog/static/6404826620122942057214/
% figure 窗口最大化,坐標(biāo)軸也隨著窗口變大而相應(yīng)變大
scrsz = get(0,'ScreenSize');
set(gcf,'Position',scrsz);
或者
set(gcf,'outerposition',get(0,'screensize'));
get(0,'ScreenSize'); 是為了獲得屏幕大小,Screensize是一個(gè)4元素向量[left, bottom, width, height],然后用獲得的screensize向量設(shè)置fig的position屬性;
get(0) 獲取root object(根對(duì)象),根對(duì)象的所有屬性和屬性值見:http://www.baisi.net/viewthread.php?tid=6020
例:
To create a figure window that is one quarter the size of your screen and is positioned in the upper left corner, use the root object's ScreenSize property to determine the size. ScreenSize is a four-element vector: [left, bottom, width, height]:
scrsz = get(0,'ScreenSize');
figure('Position',[1 scrsz(4)/2 scrsz(3)/2 scrsz(4)/2])
其實(shí)就是用來獲得顯示器的尺寸,然后確定新建窗口的位置和大小。
代替subplot:
figure,
axes('position',[0 0.54 0.45 0.45]),imshow(im1),axis off;
axes('position',[0.5 0.54 0.45 0.45]),plotflow(flow),axis off;
axes('position',[0 0.08 0.45 0.45]),plotflow(flow,'mag'),axis off;
axes('position',[0.5 0.08 0.45 0.45]),imshow(imflow),axis off;
總結(jié)
以上是生活随笔為你收集整理的matlab figure 窗口最大化的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Visual Studio 2008 每
- 下一篇: 给大家几个不花钱看书的办法【人人都是产品