Documentation

plot::Group2d

Groups of 2D objects

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

plot::Group2d(object2d1, object2d2, …, <a = amin .. amax>, options)

Description

plot::Group2d forms a group of any number of graphical 2D objects.

Grouping together a larger number of graphical objects and accessing the group as a whole simplifies their handling. In particular, the main purpose of a group is to inherit graphical attributes that are shared by all members of the group.

To change the inherited attributes interactively, do not select the group itself in the interactive object browser of the MuPAD® graphics tool (see Viewer, Browser, and Inspector: Interactive Manipulation). Underneath the group object, find 'defaults' branches for the objects in the group. Select the 'defaults' branch for the object type that you want to set attributes for.

A group can contain groups.

    Note:   When working with groups of points, the more efficient approach is to use the specialized grouping construct plot::PointList2d instead of generic groups of points.

Attributes

AttributePurposeDefault Value
Namethe name of a plot object (for browser and legend) 
VisiblevisibilityTRUE

Examples

Example 1

Consider a group G1 consisting of two triangles inscribed in an ellipse. Form a new group G2 consisting of the group G1, the ellipse and its focal points. The entire figure given by the group G2 is rotated by an animated plot::Rotate2d:

G1 := plot::Group2d(
  plot::Polygon2d([[0, -1], [0, 1], [-2, 0]]),
  plot::Polygon2d([[0, -1], [0, 1], [ 2, 0]]),
  Closed = TRUE, Filled = TRUE, Color = RGB::Blue):
G2 := plot::Group2d(
  G1, 
  plot::Ellipse2d(2, 1,[0, 0]),
  plot::PointList2d([[-sqrt(3), 0], [sqrt(3), 0]]),
  PointSize = 2*unit::mm,
  PointColor = RGB::Red,
  LineColor = RGB::Black):
plot(plot::Rotate2d(a, [0, 0], a = 0..2*PI, G2))

delete G1, G2:

Parameters

object2d1, object2d2, …

Graphical 2D objects

See Also

MuPAD Functions

MuPAD Graphical Primitives

More About

Was this topic helpful?