Set default setting of attributes
This functionality does not run in MATLAB.
type::attr = value, …)
plot::setDefault(plot::Object::Attribute = Value) sets
the default of the attribute
Attribute for objects
While not all attributes have defaults, it is in general possible
to set defaults for them, although some examples like setting a default
function to plot for
probably more exotic than others, to say the least.
Defaults are set and retrieved per object; with the exception
the attribute must be prefixed with the name of the object type the
setting shall be valid for. There is, e.g., no function to turn of
all lines on all 3D objects.
OutputOptions are not
associated with an object and must be set directly.
To delete a default (which is not recommended for attributes
having a default in the standard installation), set
By default, function plots use relatively thin lines:
For some applications, this is undesirable, for example when projecting graphics for a larger audience. It is always possible to set thicker lines in the call:
plotfunc2d(sin(x), LineWidth = 1*unit::mm)
However, this is distracting and cumbersome. Using
we change the default setting once and for the whole session:
plot::setDefault(plot::Function2d::LineWidth = 1*unit::mm): plotfunc2d(sin(x))
One thing you should know in this context:
the actual plotting. Changing color and legend settings of the latter
two does not influence the former, however, since
plotfunc3d set color and legend settings
A domain of the plot library, i.e., an object type such as
Attributes admissible for the object type
The new default value: a value admissible for
plot::setDefault returns the previous default
plot::getDefault returns the current
"Admissible attributes" includes all the attributes
the object itself reacts to. Hints cannot be set or changed with
For attributes marked as "mandatory," default values are read and used the moment an object is created. Default values of attributes marked as "optional" or "inherited" are read when the object is plotted and can therefore be changed after creating an object.