Search
Ploticus >
Scripts >
Ploticus time support
Ploticus can plot time values directly.
There are several
functions
that may be useful when working with time values.
Supported time notations
Clock times must be in the range of 0:00:00 to 24:00:00.
Elapsed times have no upper limit, eg.
233:58:00 is a valid elapsed time.
Time values must always be positive and
the minutes and seconds components must always be < 60.
The default notation is hh:mm.
Clock time notations
hh:mm:ss (example 11:25:02)
Elapsed time notations
hhh:mm:ss (example 42:25:02)
mm:ss (example 25:02) (minutes component must be < 60)
Seconds are floating-point values (see Fractional seconds, below).
Using various time notations
To work with data having other time notations, use the
format portion of the
xscaletype or yscaletype attributes of proc areadef.
For example:
#proc areadef
xscaletype: time mm:ss
Display-only notations
In addition to the time arithmetic notations shown above,
the following formats may be used to display clock time values:
hh:mma (examples: 11:25am, 0:40am 2:20pm)
hhA (examples: 11AM, 0AM, 2PM)
Others:
hh:mm:ssa m:ss hh mm m ss s
Basic unit
The basic time unit is a minute, regardless of
which notation is in use.
Axis stubs and tics may be
expressed in hours or seconds if desired.
Fractional seconds
Seconds are represented as floating point values, and by default
only non-zero decimal components are displayed (%02g).
To control the displayed decimal format of seconds,
use a printf-style double format specifier instead of ss
in the time notation string.
For example, hh:mm:%02.02f
Stubs may be incremented by fractions of seconds, eg. stubs: inc 0.2 seconds
Key to notation codes
hhh = hours, elapsed time, no upper limit
hh = hours, 00 to 24 (00 to 11 for am/pm notation)
h = hours, 0 to 24, (0 to 11 for am/pm notation)
mm = minute 00 to 59
m = minute 0 to 59
ss = second 00.0 to < 60.0 (floating point, see above)
s = second 0.0 to < 60.0 (floating point, see above)
ai = am/pm notation (use A capitals e.g. AM or PM)
Notes
With am/pm notation noon is shown as eg. 12N; midnight is eg. 0AM or 12AM