Just a quick question regarding figures, Why does the following code not produce a square figure:
figure('Position',[250 250 500 500])
Only thing I can think of is screen resolution is different in horizontal and vertical directions? If so, is there anyway to determine what dpiX and dpiY are? Because of this, is it better to build a GUI using units in inches or centimeters rather then using pixels?
"Jacob " <jacob.barton1@gmail.com> wrote in message <hcrcla$pbf$1@fred.mathworks.com>...
> Hi All,
>
> Just a quick question regarding figures, Why does the following code not produce a square figure:
>
> figure('Position',[250 250 500 500])
>
> Only thing I can think of is screen resolution is different in horizontal and vertical directions? If so, is there anyway to determine what dpiX and dpiY are? Because of this, is it better to build a GUI using units in inches or centimeters rather then using pixels?
>
> Regards Jake
get(0,'screensize')
might help you. I do not think there is a way to determine the actual size of the screen in cm programmatically.
That returns the size off the screen, but still doesn't explain why a window 500x500 isn't square. I read in the documentation that you can change the units from pixels to normalized or absolute so was just wondering what the best approach is.
I dont understand why anyone would work in pixels if a window specified as 500x500 isn't square. Its like comparing apples and oranges isn't it? Plus your GUI will be dependent on the pixel density dpiX and dpiY so it might look completely different on another machine?
"Jake " <elbarto_87@hotmail.com> wrote in message <hd1567$eum$1@fred.mathworks.com>...
> Can anybody please shed some more light on this problem? I assume that there is a reasonably simple explanation?
>
> Regards Jake
Using my measurement lint I get a square red figure (inside, i.e., excluding the bar and menu etc.) after
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.