getfigdim
GET FIGure DIMensions.
Contents
Syntax
[figsize,figborders]=getfigdim(figh)
Description
Function creates a figure and then measures the appropriate values to obtain border widths and heights of the menu and tool bars and other parameters. This can then be used to size and place figures more exactly.
"figh" is the handle of the figure whose dimensions are measured. If "figh" is not specified or empty then a figure will be created.
"figsize" is a four element row vector which specifies the figure. The vector is as follows: [left bottom width height] These are the same values returned by "OuterPosition" property.
"figborders" is a 6 element row vector which is defined as: [figureborder titlebarheight menubarheight toolbarheight minfigwidth minfigheight] The figureborder is defined as the border width for all four sides of the figure. The minfigwidth, minfigheight are the minimum size of figures that Matlab produces without menu and tool bars.
Example:
[fsize,fborder]=getfigdim;
Results: fsize = [227 241 570 504] fborder = [5 26 21 27 125 37]
- Copyright 2006 Mirtech, Inc. created 08/20/2006 by Mirko Hrovat on Matlab Ver. 7.2
email: mhrovat@email.com
%Create a figure if it doesn't exist