How to set the with of the figure window but keep the high flexible?
1 view (last 30 days)
Show older comments
I would like to set the width of the window to be maximal (screen width), but I dont want to fix the height of the figure window. It would be nice to be optimal automatically, which means that fits to the size of the plot contained in the window. Is it possible?
0 Comments
Answers (1)
Walter Roberson
on 12 Nov 2015
No. Figure windows can be sized in absolute units (cm, inches, pixels), or proportionate to the screen ('normalized'), but they always have a well-defined size.
All of the drawing routines are defined in terms of data units, with the exception that text can be specified in "points". Whatever drawing is done is made to fit within the size available.
What this leaves is that axes size can be specified in absolute units or 'normalized'. Usually they are done pretty casually as normalized, but it is possible to set absolute sizes for axes. And since you would know the needed size at that point, that would be the time to set the Figure (that is, the window) to a different height if you wanted.
2 Comments
Walter Roberson
on 12 Nov 2015
I am not sure what you mean by "save" in this context? Do you mean that you have screen content that is being generated by some other program (outside MATLAB) and you wish to do a screen capture of it?
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!