MATLAB Function Reference Previous page   Next Page
hggroup

Create hggroup object

Syntax

Description

An hggroup object can be the parent of any axes children, including other hggroup objects. You can use hggroup objects to form a group of objects that can be treated as a single object with respect to the following cases:

Examples

This example defines a callback for the ButtonDownFcn property of an hggroup object. In order for the hggroup to receive the mouse button down event that executes the ButtonDownFcn callback, the HitTest properties of all the line objects must be set to off. The event is then passed up the hierarchy to the hggroup.

The following function creates a random set of lines that are parented to an hggroup object. The subfunction set_lines defines a callback that executes when the mouse button is pressed over any of the lines. The callback simply increases the widths of all the lines by 1 with each button press.

Note that selecting any one of the lines selects all the lines. (To select an object, enable plot edit mode by selecting Plot Edit from the Tools menu.)

Instance Diagram for This Example

The following diagram shows in object hierarchy created by this example.

Hggroup Properties

Setting Default Properties

You can set default hggroup properties on the axes, figure, and root levels.

where Property is the name of the hggroup property whose default value you want to set and PropertyValue is the value you are specifying. Use set and get to access the hggroup properties.

See Also

hgtransform

Group Objects for more information and examples.

Function Handle Callbacks for information on how to use function handles to define callbacks.

Hggroup Properties for property descriptions


Previous page  hgexport Hggroup Properties Next page

© 1994-2005 The MathWorks, Inc.