Scaling of 2D objects

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.


plot::Scale2d([sx, sy], obj1, <obj2, …>, <a = amin .. amax>, options)


plot::Scale2d([sx, sy], objects) applies the scaling transformation with the diagonal matrix A = diag(sx, sy) to 2D objects.

Scale objects can scale several graphical objects simultaneously. Plotting the scale object renders all graphical objects inside.

Transformation objects can be used inside scale objects. If they are animated, the animations run simultaneously.

Animated scale objects are rather "cheap" concerning computing and storing costs. For more complex graphical objects, it is more efficient to use an animated scale object than to redefine the object for each frame.

The function op allows to extract the graphical objects inside a scale object.


AttributePurposeDefault Value
AffectViewingBoxinfluence of objects on the ViewingBox of a sceneTRUE
Framesthe number of frames in an animation50
Namethe name of a plot object (for browser and legend) 
ParameterEndend value of the animation parameter 
ParameterNamename of the animation parameter 
ParameterBegininitial value of the animation parameter 
ParameterRangerange of the animation parameter 
Scalescaling factors[1, 1]
ScaleXscaling factor in x-direction1
ScaleYscaling factor in y-direction1
TimeEndend time of the animation10.0
TimeBeginstart time of the animation0.0
TimeRangethe real time span of an animation0.0 .. 10.0


Example 1

A scaling transformation turns a circle into an ellipse:

plot(plot::Scale2d([1 + 3*a, 1 + a], 
                   a = 0..1))


sx, sy

The scaling factors: numerical real values or arithmetical expressions of the animation parameter a.

sx, sy are equivalent to the attributes Scale, ScaleX, ScaleY.

obj1, obj2, …

Arbitrary plot objects of the appropriate dimension


Animation parameter, specified as a = amin..amax, where amin is the initial parameter value, and amax is the final parameter value.

Was this topic helpful?