Plot Time Series
# S4 method for TimeSeries,missing plot( x, facet = c("multiple", "single"), calendar = getOption("aion.calendar"), panel = graphics::lines, flip = FALSE, ncol = NULL, xlab = NULL, ylab = NULL, main = NULL, sub = NULL, ann = graphics::par("ann"), axes = TRUE, frame.plot = axes, panel.first = NULL, panel.last = NULL, ... )
characterstring specifying whether the series should be plotted separately (with a common time axis) or on a single plot? It must be one of "
multiple" or "
single". Any unambiguous substring can be given.
logicalscalar: should the y-axis (ticks and numbering) be flipped from side 2 (left) to 4 (right) from series to series when
integerspecifying the number of columns to use when
multiple". Defaults to 1 for up to 4 series, otherwise to 2.
- xlab, ylab
charactervector giving the x and y axis labels.
characterstring giving a main title for the plot.
characterstring giving a subtitle for the plot.
logicalscalar: should the default annotation (title and x and y axis labels) appear on the plot?
logicalscalar: should axes be drawn on the plot?
logicalscalar: should a box be drawn around the plot?
expressionto be evaluated after the plot axes are set up but before any plotting takes place. This can be useful for drawing background grids.
expressionto be evaluated after plotting has taken place but before the axes, title and box are added.
Further parameters to be passed to
panel(e.g. graphical parameters).
plot() is called for its side-effects: it results in a graphic
being displayed. Invisibly returns
## Create 6 time-series of 50 observations ## Sampled every two years starting from 2000 BP X <- series( object = matrix(rnorm(300), nrow = 50, ncol = 6), time = seq(2000, by = -2, length.out = 50), calendar = BP() ) ## Multiple plot(X) # Default calendar plot(X, calendar = BP(), flip = TRUE) # BP plot(X, calendar = b2k(), ncol = 1) # b2k ## Single plot(X, facet = "single") # CE plot(X, facet = "single", calendar = BP()) # BP ## Create 6 x 3 time-series of 50 observations ## Sampled every two years starting from 2000 BP X <- series( object = array(rnorm(900), dim = c(50, 6, 3)), time = seq(2000, by = 2, length.out = 50), calendar = BP() ) plot(X, calendar = BP(), flip = TRUE) # BP plot(X, calendar = b2k(), ncol = 1) # b2k ## Graphical parameters plot(X, lwd = c(1, 2, 3), col = c("#004488", "#DDAA33", "#BB5566")) plot(X, type = "b", pch = 16, col = c("#004488", "#DDAA33", "#BB5566")) plot(X, type = "p", pch = c(16, 17, 18), cex = c(1, 2, 3))