MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
object1, object2, …, <
a = amin .. amax>,
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,
plot command such as
object2, …) implicitly creates
a default canvas object to display the graphical objects in.
Strictly speaking, a canvas object is a container for scenes
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
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.
|behaviour of the animation toolbar|
|start animations automatically|
|color of frame/border around canvas and scenes|
|width of frame/border around canvas and scenes|
|bottom margin width|
|number of columns of scenes|
|font of footers (scene and canvas)||[|
|alignment of footer of canvas and scenes|
|font of headers (scene and canvas)||[|
|alignment of header of canvas and scenes|
|heights of canvas/scenes|
|initial time of the animation slider|
|arrangement/layout of several scenes in a canvas|
|left margin width|
|margins around canvas and scenes|
|the name of a plot object (for browser and legend)|
|the physical length unit used by the inspector|
|right margin width|
|number of rows of scenes|
|space between scenes|
|top margin width|
|widths of canvas/scenes|
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: