[R-SIG-Finance] abline() for zoo plot ?
Gabor Grothendieck
ggrothendieck at gmail.com
Fri Feb 22 20:35:36 CET 2008
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:
> Can you somehow use the convenient abline() function in zoo plots ?
> I am mainly looking for an easy way of adding vertical lines at specific
> locations to my zoo plots.
>
> Thanks!
>
> Markus
More information about the R-SIG-Finance
mailing list