Skip to content
Prev 246885 / 398506 Next

Lattice, combine histogram and line graph

On Sun, Jan 9, 2011 at 8:13 PM, Jim Burke <j.burke at earthlink.net> wrote:
xyplot.zoo in the zoo package has facilities for drawing multiple time
series using lattice graphics or in different panels.  The
documentation has many examples.

library(zoo)
library(lattice)

z1 <- zoo(1:6)
z2 <- z1^2
z <- cbind(z1, z2)
xyplot(z) # different panels
xyplot(z, screen = 1) # all on one panel

?xyplot.zoo
example(xyplot.zoo)
vignette(package = "zoo") # lists available vignettes