This functionality does not run in MATLAB.
plot::Canvas(object1, object2, …, <a = amin .. amax>, options)
plot::Canvas is the top level element of the hierachy of graphical objects. It represents the 2 dimensional drawing area into which 2D and 3D plots are painted.
The user does not need to create a canvas object explicitly, because a plot command such as plot(object1, object2, …) implicitly creates a default canvas object to display the graphical objects in.
Strictly speaking, a canvas object is a container for scenes of type plot::Scene2d or plot::Scene3d, respectively. The user, however, does not have to bother about this technicality, because a suitable default scene is created internally, when graphical primitives are passed to plot::Canvas.
A canvas can display several scenes simultaneously. However, all scenes must be of the same dimension. A mixture of 2D and 3D is not supported!
See the help page of the canvas attribute Layout for details on the layout of a canvas containing several scenes.
The canvas object is always visible in the interactive object browser of the MuPAD® graphics tool (see section Viewer, Browser, and Inspector: Interactive Manipulation of this document). It can contain one or more scenes as its children. When the canvas object is selected, it provides access to a variety of attributes that are associated with the canves. The canvas attributes allow to
A complete listing of the attributes associated with a canvas is given below. Follow the links to the help pages of the attributes to find more detailed information.
Apart from these attributes of the canvas object, also attributes for scenes, coordinate systems and graphical objects inside the canvas can be specified when generating a canvas object. These attribute values are inherited to the objects inside the canvas as new default values.
|AnimationStyle||behaviour of the animation toolbar||RunOnce|
|AutoPlay||start animations automatically||TRUE|
|BorderColor||color of frame/border around canvas and scenes||RGB::Grey50|
|BorderWidth||width of frame/border around canvas and scenes||0|
|BottomMargin||bottom margin width||1|
|Columns||number of columns of scenes||0|
|FooterFont||font of footers (scene and canvas)||[" sans-serif ", 12]|
|FooterAlignment||alignment of footer of canvas and scenes||Center|
|HeaderFont||font of headers (scene and canvas)||[" sans-serif ", 12]|
|HeaderAlignment||alignment of header of canvas and scenes||Center|
|Height||heights of canvas/scenes||80|
|InitialTime||initial time of the animation slider|
|Layout||arrangement/layout of several scenes in a canvas||Tabular|
|LeftMargin||left margin width||1|
|Margin||margins around canvas and scenes||1|
|Name||the name of a plot object (for browser and legend)|
|OutputUnits||the physical length unit used by the inspector||unit::mm|
|RightMargin||right margin width||1|
|Rows||number of rows of scenes||0|
|Spacing||space between scenes||1.0|
|TopMargin||top margin width||1|
|Width||widths of canvas/scenes||120|
We diplay several scenes in a canvas. Various canvas attributes are passed when creating the canvas object:
S1 := plot::Scene2d(plot::Function2d(sin(x), x = 0..2*PI), Header = "the sine function"): S2 := plot::Scene2d(plot::Function2d(cos(x), x = 0..2*PI), Header = "the cosine function"): S3 := plot::Scene2d(plot::Function2d(tan(x), x = 0..PI), Header = "the tan function"): S4 := plot::Scene2d(plot::Function2d(cot(x), x = 0..PI), Header = "the cot function"): C := plot::Canvas(S1, S2, S3, S4, Width = 80*unit::mm, Height = 80*unit::mm, BorderWidth = 0.5*unit::mm, Header = "trigonometric functions", HeaderFont = ["Times New Roman", Bold, 18]): plot(C)
delete S1, S2, S3, S4, C: