Graphics |
Example -- Specifying Figure Position
Suppose you want to define two figure windows that occupy the upper third of the computer screen (e.g., one for uicontrols and the other to display data). To position the windows precisely, you must consider the window borders when calculating the size and offsets to specify for the Position
properties.
Position
property does not include the window borders, so this example uses a width of 5 pixels on the sides and bottom and 30 pixels on the top.
pos1 = [bdwidth,... 2/3*scnsize(4) + bdwidth,... scnsize(3)/2 - 2*bdwidth,... scnsize(4)/3 - (topbdwidth + bdwidth)]; pos2 = [pos1(1) + scnsize(3)/2,... pos1(2),... pos1(3),... pos1(4)];
The two figures now occupy the top third of the screen.
Positioning Figures | Figure Colormaps -- The Colormap Property |
© 1994-2005 The MathWorks, Inc.