Skip to content
Prev 2202 / 15274 Next

abline() for zoo plot ?

Sure. Here are two examples with plot.zoo:

library(zoo)

# single panel
z <- zoo(1:10)
plot(z)
abline(v = 5)

# multipanel
plot(merge(z, lag(z, -1)), panel = function(x, y, ...) {lines(x, y);
abline(v = 5) } )

If you use xyplot.zoo then you can use all the lattice graphics facilities.


On Fri, Feb 22, 2008 at 2:14 PM, Markus Loecher
<markus at insightfromdata.com> wrote: