Each visual object – that is, an object that is or can be part of a diagram – has an internal and unique name. A “reference” to such an object is an Algosim object that contains such a name and thus serves as a reference to the visual object.
diagram function returns a reference to the diagram it selects and each function that creates a chart or plot returns a reference to the newly created visual object.
When a reference is returned by an expression, the front end automatically displays the diagram containing (or being) the referenced visual object.
References are ordinary (but opaque and immutable) Algosim objects and can be stored in variables. Hence, it is possible for a variable to contain a reference to a visual object that has been removed. If such a reference is returned by an expression, noting happens.
A reference may contain references to other objects, typically “parts” of the object it is referring to. These are accessed using the
. operator (just like structure members).
For instance, if
d is a reference to a diagram, then
d.axes is a reference to its collection of axes, and
d.axes.x is a reference to its horizontal axis.