DADiSP Worksheet Functions > Function Categories > Plot Attributes > SETXLABEL, SETYLABEL, SETZLABEL
Sets the x-axis, y-axis or z-axis label independently of Units.
SETXLABEL(win, "label")
SETYLABEL(win, "label")
SETZLABEL(win, "label")
XLABEL(win, "label")
YLABEL(win, "label")
ZLABEL(win, "label")
win |
- |
Optional. A window, defaults to the current Window. |
"label" |
- |
A string, the axis label |
setxlabel("Variability, % Total")
sets the x-axis label in the current Window to display: Variability, % Total.
xlabel("Variability, % Total")
same as above.
plot3d(spline2(rand(10), 2));xlabel("X Axis");ylabel("Y Axis");zlabel("Z Axis");scales(2);
creates a 3D plot and labels each axis.
Horizontal, Vertical and Height units have a 15 character maximum length restriction. SETXLABEL, SETYLABEL and SETZLABEL allow the user to set an axis label which can be more than 15 characters long and which is independent of units, so that the automatic translation of units can continue to operate.
In both interactive and printed output, an axis label, if set, will cover whichever units label has been defined for the axis. If the user has set an axis label, then units will not appear.
Axis labels apply to the current focus, so to apply axis label functions to an overlay, use FOCUS to set the current focus to the desired overlay before calling any axis label functions.
A subset of TeX string formatting is supported to annotate graphics with Greek letters and mathematical symbols. For example:
grand(100,1);setylabel("$F(\Omega_0^2)$");setxlabel("$\Omega_0$")
The same result can be achieved with:
grand(100,1);ylabel("$F(\Omega_0^2)$");xlabel("$\Omega_0$")
See TEX for further details.