Skip to content
Prev 275753 / 398506 Next

plotting large time series

A simple way may be not to plot all data points. But it will depend on 
your data if that is a good idea.

Regards,
Enrico

## EXAMPLE

require("zoo")

## random data
dates <- seq(from = as.Date("2000-01-01"),
              to   = as.Date("2011-10-31"), by = "1 day")
x <- cumsum(rnorm(length(dates)))

## plot all
plot(zoo(x, dates), col = "blue")

## plot every 100th point
subs <- seq(1, length(x), by = 10)
lines(zoo(x[subs], dates[subs]), lwd = 2)


Am 28.10.2011 02:46, schrieb jim holtman: