Documentation

plot::copy

Make a physical copy of a plot object

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

plot::copy(obj)

Description

Objects created from inside the plot library have a reference effect: If you make another reference to some object, say by calling o2 := o1; and then change an attribute of o2, for example, setting o2::Visible := FALSE, this change will also effect the object referred to by o1, because they actually refer to the same object. To create an actual copy of an object instead, use o2 := plot::copy(o1);.

Examples

Example 1

The following call does not create two points, but rather one which we can access by two names:

A := plot::Point2d(0, 0):
B := A:

This becomes obvious when you try to modify one of the points:

B::Position := [1, 1]:
A

To copy a point, use plot::copy :

B := plot::copy(A):
B::Position := [2, 2]:
A, B

Parameters

obj

Plot objects

Return Values

Object of the same type as obj

See Also

MuPAD Functions

Was this topic helpful?