DADiSP Worksheet Functions > Function Categories > Plot Attributes > SETHUNITS
Sets the horizontal (X) units of a series.
SETHUNITS(series, "xunits")
series |
- |
Optional. Any series, table, or expression evaluating to a series or table. Defaults to the current Window. |
"xunits" |
- |
A string, the X units. |
sethunits("Hz")
sets the horizontal (X) units of the series in the current Window to Hz, or Hertz.
myser = gnorm(1000, 1);
sethunits(myser, "Hz");
sets the horizontal (X) units of the series myser to Hertz.
W1: integ(gnorm(1000, 1/3));sethunits("Time")
Because the horizontal units are set to "Time", the actual clock time for the series is displayed along the X axis. Use "Real Time" to display clock time with fractional seconds.
See UNITS for a list of supported units.
Compound units are reduced in terms of known supported units. If the unit string is not internally defined (such as lightyears), the string is still assigned to the vertical unit string, but further unit reduction is not performed, however unit expansion (e.g. lightyears^2) will still occur.
See DEFUNITS to define a unit with a specific expansion.
A series with date/time X units displays tic values in terms of actual calendar or clock time. The starting date and time is determined by the series start date and start time.
The following units are considered date/time units:
Real Time |
Time |
Daily |
Yearly |
Monthly |
Weekly |
Quarterly |
Minutely |
Business Days |