Main Content

hggroup

Create group object

Syntax

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

Properties

For a list of properties, seeGroup Properties.

Description

h = hggroupcreates aGroupobject as a child of the current axes and returns its handle,h.

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

h = hggroup(ax,...)creates theGroupobject in the axes specified byaxinstead of in the current axes (gca). The optionaxcan precede any of the input argument combinations in the previous syntaxes.

AGroupobject can be the parent of any axes, as well as otherGroupobjects. UseGroupobjects to form a group of child objects that can be treated as a single object.

Examples

CreateGroupObject with Five Lines

创建一个Groupobjecthg, and plot five lines. Set the'Parent'property of the lines to behgwhen you call theplotfunction.

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

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

Introduced before R2006a