plot.zoo {zoo} | R Documentation |
Plotting method for objects of class "zoo"
.
## S3 method for class 'zoo': plot(x, plot.type = c("multiple", "single"), panel = lines, xlab = "Index", ylab = NULL, main = NULL, ylim = NULL, oma = c(6, 0, 5, 0), col = 1, lty = 1, nc, ...) ## S3 method for class 'zoo': lines(x, type = "l", ...)
x |
an object of class "zoo" . |
plot.type |
for multivariate zoo objects, should the observations be plotted separately (with a common index axis) or on a single plot? |
panel |
a 'function(x, y, col, lty, ...)' which gives the action to be carried out in each panel of the display for 'plot.type="multiple"'. The default is 'lines'. |
xlab, ylab, main, ylim, oma, type |
graphical arguments, see par . |
col, lty |
graphical arguments that can be vectorized for 'plot.type = "multiple"'. |
nc |
the number of columns to use when 'plot.type="multiple"'. Defaults to 1 for up to 4 series, otherwise to 2. |
... |
additional graphical arguments. |
The methods for plot
and lines
are very similar
to the corresponding ts
methods.
x.date <- as.POSIXct(paste("2003-02-", c(1, 3, 7, 9, 14), sep = "")) x <- zoo(rnorm(5), x.date) x2 <- zoo(rnorm(5, sd = 0.2), x.date) plot(x) lines(x2, col = 2)