Graphics Previous page   Next Page

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.

  1. The figure 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.
  2. Ensure root units are pixels and get the size of the screen:
  3. Define the size and location of the figures:
  4. Create the figures:

The two figures now occupy the top third of the screen.

Previous page  Positioning Figures Figure Colormaps -- The Colormap Property Next page

© 1994-2005 The MathWorks, Inc.