Compute the tick marks, axis breaks, grid lines, or scale
of the time axis, for plotting
a calendar time series.
These functions are all meant to be called from
axis.time.
a vector of character strings indicating which
tick marks are to be displayed.
Up to three types of tick marks are supported:
"small",
"medium", and
"big".
width
the width of each break as a fraction of the plottting region.
max.width
the maximum total width taken up by axis breaks, as a fraction of the
plotting region.
at
if not
NULL, place the ticks at
tick level
level.override at these
values, instead of at "pretty" values. Must be a vector of
timeDate values, or something that
can be converted to
timeDate values.
level.override
tick level to override with the values of
at.
VALUE:
Each function returns a list suitable for passing to
axis.render
or
grid.render that contains parameters for generating axis ticks,
axis breaks, or grid lines.
axis.time.ticks
returns a list with components named as in
levels:
small
controls the small, frequent tick marks;
medium the medium
tick marks; and
big the large, least frequent tick marks.
Each of the sets of tick parameters is a list containing an
at
component, telling where to put the ticks, in time coordinates,
generated by calling
timeSeq
using the
by and
k.by parameters in
axis.info.
axis.time.breaks
returns a list with an
at component telling where
to put the breaks (generated from
axis.info$intervals$close),
and a
width component giving the width of the
breaks (this may not be the same as the
width argument, if the total
width of breaks would have exceeded
max.width).
axis.time.grid
returns a list with up to two components:
major.grid
and
minor.grid; each component is a list containing
an
x component telling where the grid lines should be, which
come from the label positions
label.info$outer.label and
label.info$main.label
respectively; if
label.info has no names,
it is treated as being the
main.label list only.
axis.time.scale
returns an axis scale list, whose first component
is a vector of times and second component is a vector of corresponding
numeric values. Since internal plotting functions only deal with numbers,
the time values for plotting are transformed to numbers using this
scale, linearly interpolating between the values. The scale is calculated
taking into consideration axis breaks and
axis.info$skip.weekends.
The other tick, break, and grid parameters use the default values from
trellis.par.get
; for more information see
axis.render and
grid.render.