本文介绍了设置图形图形尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要做的就是增大宽度,减小高度.我只是在做栅格图,但是这个问题适用于任何MATLAB figure
.我可以在创建图形时直接使用图形手动调整其大小,但是我希望程序以正确的尺寸将其吐出.
All I want to do is make the width greater and the height smaller. I'm just doing raster plots but this question applies to any MATLAB figure
. I can manually resize it using the figure directly when it's created but I want the program to spit it out in the right size to start with.
推荐答案
可为figure
设置的属性被引用此处.
The properties that can be set for a figure
is referenced here.
然后您可以使用:
figure_number = 1;
x = 0; % Screen position
y = 0; % Screen position
width = 600; % Width of figure
height = 400; % Height of figure (by default in pixels)
figure(figure_number, 'Position', [x y width height]);
这篇关于设置图形图形尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!