Graphics |
Group objects enable you to treat a number of axes child objects as one group. For example, you can make the entire group visible or invisible, select all objects when only one is clicked, or apply a transform matrix to reposition the objects by setting only one property on the group object.
hggroup
function.
hgtransform
function.
Note that the difference between the hggroup and hgtransform objects is ability of the hgtransform object to apply a transform matrix (via its Matrix
property) to all objects for which it is the parent.
Creating a Group
You create a group by parenting axes children to an hggroup or hgtransform object. For example,
hb = bar(rand(5));% creates 5 barseries objects
hg = hggroup; set(hb,'Parent',hg)% parent the barseries to the hggroup
set(hg,'Visible','off')% makes all barseries invisible
Group objects can be the parent of any number of axes children, including other group objects.
Note Many plotting functions clear the axes (i.e., remove axes children) before drawing the graph. Clearing the axes also deletes any hggroup or hgtransform objects in the axes. |
Annotation Objects | Transforming Objects |
© 1994-2005 The MathWorks, Inc.