matlab figure 窗口最大化

http://blog.163.com/yinhexiwen@126/blog/static/6404826620122942057214/

% figure 窗口最大化,坐标轴也随着窗口变大而相应变大
scrsz = get(0,'ScreenSize');
set(gcf,'Position',scrsz);

或者

set(gcf,'outerposition',get(0,'screensize'));

get(0,'ScreenSize'); 是为了获得屏幕大小,Screensize是一个4元素向量[left, bottom, width, height],然后用获得的screensize向量设置fig的position属性;
get(0) 获取root object(根对象),根对象的所有属性和属性值见: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])

其实就是用来获得显示器的尺寸,然后确定新建窗口的位置和大小。

代替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;

转载于:https://www.cnblogs.com/AI-Algorithms/p/3671751.html

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值