Plots many time series plots on the same graphical device. Each plot gets its own frame. Scales can be adjusted to see variation in each plot (each plot gets its own scale), or variation between plots (common scale).
PlotManyTs(x, type = "l", gap = 0, boxes = TRUE, truth = NULL,
thin = 1, labs, same.scale = TRUE, ylim = NULL,
refline = NULL, color = NULL, ...)
Matrix, data frame, list, or 3-dimensional array to be plotted.
type of line plots to produce. See
plot.default
for other options.
Number of lines of space to put between plots.
Logical indicating whether boxes should be drawn around each plot.
A vector or matrix of reference values to be added to
each plot as a horizontal line. The dimension should match
dim(x)[-1]
Frequency of observations to plot. E.g. thin=10
means plot every 10'th observation. Thinning can speed things up
when plotting large amounts MCMC output.
Optional character vector giving the title (e.g. variable
name) for each plot. If labs
is missing then column names or
dimnames will be used to label the plots. If labs
is
NULL
then no labels will be used.
Logical indicating whether plots should be drawn
with a common vertical axis, which is displayed on alternating rows
of the plot. If FALSE
then the vertical axis of each plot is
scaled to the range of data in that plot, but no tick marks are
displayed.
Scale of the vertical axis. If non-NULL then same.scale
is set to TRUE
and the supplied scale is used for all plots.
a vector or scalar value to use as a reference line.
This is a supplement to the truth
argument. It can be useful
when comparing true values (used in a simulation), estimated values
(e.g. point estimates of parameters) and MCMC output.
Vector of colors to use in the plots.
Steven L. Scott
plot.ts
(for plotting a small number of time series)
plot.macf
x <- matrix(rnorm(1000), ncol = 10)
PlotManyTs(x)
PlotManyTs(x, same = FALSE)
Run the code above in your browser using DataLab