MATLAB Creating Graphical User Interfaces

(ff) #1

(^1) Use the Property Inspector to modify the appropriate properties. Open the Property
Inspector by selecting View > Property Inspector or by clicking the Property
Inspector button.
(^2) In the layout area, select the component you are defining.
Subsequent topics describe commonly used properties of axes and offer a simple example.



  • “Commonly Used Properties” on page 6-45

  • “Create Axes” on page 6-46


Commonly Used Properties


The most commonly used properties needed to describe an axes are shown in the
following table:


Property Values Description
NextPlot add, replace,
replacechildren. Default
is replace

Specifies whether plotting
adds graphics, replaces
graphics and resets axes
properties to default, or
replaces graphics only.
Position 4-element vector: [distance
from left, distance from
bottom, width, height].

Size of the component and
its location relative to its
parent.
Units normalized,
centimeters,
characters, inches,
pixels, points. Default is
normalized.

Units of measurement used
to interpret position vector

For a complete list of properties and for more information about the properties listed in
the table, see Axes.


See commands such as the following for more information on axes objects: plot, surf,
line, bar, polar, pie, contour, imagesc, and mesh.


Many of these graphing functions reset axes properties by default, according to the
setting of its NextPlot property, which can cause unwanted behavior, such as resetting
axis limits and removing axes context menus and callbacks. See “Create Axes” on page 6-
46 and “Axes” on page 9-20 for information about setting the NextPlot property.


Add Components to the GUIDE Layout Area
Free download pdf