p.ts {sfsmisc} | R Documentation |
For longer time-series, it is sometimes important to spread the time-series plots over several subplots. p.ts(.) does this both automatically, and under manual control.
Actually, this is a generalization of plot.ts
(with different defaults).
p.ts(x, nrplots = max(1, min(8, n %/% 400)), overlap = nk %/% 16, main.tit = NULL, ylim = NULL, ylab = "", quiet = FALSE, mgp = c(1.25, .5, 0),...)
x |
timeseries (possibly multivariate) or numeric vector. |
nrplots |
number of sub-plots. Default: in {1..8},
approximately n/400 if possible. |
overlap |
by how much should subsequent plots overlap. Defaults to about 1/16 of sub-length on each side. |
main.tit |
Main title (over all plots). Defaults to name
of x . |
ylim |
numeric(2) or NULL; if the former, specifying the y-range for the plots. Defaults to a common pretty range. |
ylab |
label for y-axis, see description in plot.default . |
quiet |
logical; if TRUE , there's no reporting on each subplot. |
mgp |
numeric(3) to be passed to mult.fig() , see
par(mgp = .) . |
... |
further graphic parameters for each plot.ts(..) . |
A page of nrplots
subplots is drawn on the current
graphics device.
Martin Maechler, maechler@stat.math.ethz.ch; July 1994 (for S).
require(ts) # package data(sunspots) p.ts(sunspots, nr=1) # == usual plot.ts(..) p.ts(sunspots) p.ts(sunspots, nr=3, col=2) ## multivariate : data(EuStockMarkets) p.ts(log10(EuStockMarkets), col = 2:5)