Matlab-调整大小 [英] Matlab - resizing figure

查看:156
本文介绍了Matlab-调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含10个面板的GUI.我的LCD是20英寸.当我想在笔记本电脑(15.6英寸)中看到我的GUI时,我无法正确看到面板.我已经检查了所有解决方案,但无法解决此问题. 谁能帮我吗?

I have a GUI which has 10 panel in it. My LCD is 20". When I want to see my GUI in my laptop(15.6") I can not see my Panels properly. I have examined all the solutions, but I can not solve this problem. Can anyone help me?

推荐答案

要调整图形的大小,只需更改其Position属性.面板将根据它调整大小,具体取决于您指定面板单元的方式.也就是说,为了最大化身材:

To resize the figure just change its Position property. The panels will resize according to it, depending on how you specified your panel units. I.e., to maximize a figure:

set(figH,'Units','normalized');
set(figH,'Position',[0 0 1 1]);

如果要以像素单位指定图形大小,则:

In the case you want to specify your figure size as pixel units do:

set(figH,'Units','pixels');
set(figH,'Position',[left_gap_nPixels bottom_gap_nPixels length_nPixels width_nPixels]);

顺便说一句,我没有提到,但是figH是您的图形(或面板手柄,如果要调整其大小).如果gcf是当前的活动句柄,则可以使用.

Btw, I haven't mentioned, but figH is your figure (or panel handle, if you want to resize it). You can use gcf if it is your current active handle.

仅供参考,您可以指定的单位为:

Just as reference, the units you can specify are:

{英寸"厘米"字符"归一化"点" 像素"}

{'inches' 'centimeters' 'characters' 'normalized' 'points' 'pixels'}

考虑检查图属性文档

Consider checking the figure properties documentation and uipanel properties for more details on the position and units property.

希望有帮助.

这篇关于Matlab-调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆