Add a nicely formatted x-axis to time series plots related to the
"sts" class. This utility function is, e.g., used
1 2 3 4 5
an object of class
a logical indicating if the old (
see the details below.
further arguments passed to
epochsAsDate = TRUE
enables very flexible formatting of the x-axis and its
annotations using the
xaxis.labelFormat arguments. The first two are named lists containing
pairs with the name being a
conversion specification and the second part is a function which based
on this conversion returns a subset of the rows in the
objects. The subsetting function has the following header:
x is a vector containing
the result of applying the conversion in
name to the epochs of
sts object and
xm1 is the scalar result when
applying the conversion to the natural element just before the first
epoch. Please note that the input to the subsetting function is converted
as.numeric before calling the function. Hence, the
conversion specification needs to result in a string convertible to integer.
Three predefined subsetting functions exist:
are used to make a tick at each (each 2nd for
change and at the median index computed on all having the same value,
1 2 3 4
By defining own functions here, one can obtain an arbitrary degree of flexibility.
xaxis.labelFormat is a
compatible formatting string., e.g. the default value is
"%G\n\n%OQ", which means ISO year and quarter (in roman
letters) stacked on top of each other.
NULL (invisibly). The function is called for its side effects.
Michael H<f6>hle with contributions by Sebastian Meyer
the examples in
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.