Make a physical copy of a plot object
This functionality does not run in MATLAB.
Plot objects usually have a reference effect.
copies which are independent of the original.
Objects created from inside the
have a reference effect: If you make another
reference to some object, say by calling
o2 := o1; and
then change an attribute of
o2, e.g., setting
:= FALSE, this change will also effect the object referred
o1, since they actually refer to the same
object. To create an actual copy of an object instead, use
plot::modify is a variant of
It allows setting new values of attributes in the same call, as in
:= plot::modify(o1, Visible = FALSE);.
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 surfaces as soon as we try to modify `one of the points':
B::Position := [1, 1]: A
Instead, we can use
plot::modify to achieve
the desired effect:
B := plot::modify(A, Position = [2, 2]): A, B
Object of the same type as