Main Content

hggroup

Create group object

Syntax

h = hggroup
h = hggroup(...,'PropertyName',propertyvalue,...)
h = hggroup(ax,...)

Properties

For a list of properties, see Group Properties.

Description

h = hggroup creates a Group object as a child of the current axes and returns its handle, h.

h = hggroup(...,'PropertyName',propertyvalue,...) creates a Group object with the property values specified in the argument list.

h = hggroup(ax,...) creates the Group object in the axes specified by ax instead of in the current axes (gca). The option ax can precede any of the input argument combinations in the previous syntaxes.

A Group object can be the parent of any axes, as well as other Group objects. Use Group objects to form a group of child objects that can be treated as a single object.

Examples

Create Group Object with Five Lines

Create a Group object hg, and plot five lines. Set the 'Parent' property of the lines to be hg when you call the plot function.

hg = hggroup;
plot(randn(5),randn(5),'Parent',hg)

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

Version History

Introduced before R2006a