This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Make a physical copy of a plot object

MuPAD® notebooks are not recommended. 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.




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);.


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]:

To copy a point, use plot::copy :

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



Plot objects

Return Values

Object of the same type as obj

See Also

MuPAD Functions

Was this topic helpful?