Using MATLAB Graphics     Search    Help Desk 

Object Properties

A graphics object's properties control many aspects of its appearance and behavior. Properties include general information such as the object's type, its parent and children, whether it is visible, as well as information unique to the particular class of object.

For example, from any given figure object you can obtain the identity of the last key pressed in the window, the location of the pointer, or the handle of the most recently selected menu.

MATLAB organizes graphics information into a hierarchy and stores this information in properties. For example, root properties contain the handle of the current figure and the current location of the pointer (cursor), figure properties maintain lists of their descendants and keep track of certain events that occur within the window, and axes properties contain information about how each of its child objects uses the figure colormap and the color order used by the plot function.

Changing Values

You can query the current value of any property and specify most property values (although some are set by MATLAB and are read only). Property values apply uniquely to a particular instance of an object; setting a value for one object does not change this value for other objects of the same type.

Default Values

You can set default values that affect all subsequently created objects. Whenever you do not define a value for a property, either as a default or when you create the object, MATLAB uses "factory-defined" values.

The reference entry for each object creation function provides a complete list of the properties associated with that class of graphics object.

Properties Common to All Objects

Some properties are common to all graphics objects, as illustrated in the following table.

Property
Information Contained
BusyAction
Controls the way MATLAB handles callback routine interruption defined for the particular object
ButtonDownFcn
Callback routine that executes when button press occurs
Children
Handles of all this object's children objects
Clipping
Mode that enables or disables clipping (meaningful only for axes children)
CreateFcn
Callback routine that executes when this type of object is created
DeleteFcn
Callback routine that executes when you issue a command that destroys the object
HandleVisibility
Allows you to control the availability of the object's handle from the command line and from within callback routines
Interruptible
Determines whether a callback routine can be interrupted by a subsequently invoked callback routine
Parent
The object's parent
Selected
Indicates whether object is selected
SelectionHighlight
Specifies whether object visually indicates the selection state
Tag
User-specified object label
Type
The type of object (figure, line, text, etc.)
UserData
Any data you want to associate with the object
Visible
Determines whether or not the object is visible



[ Previous | Help Desk | Next ]