Skip to content
Prev 82434 / 398506 Next

all (y,x) data in one plot

Or use lattice:

x <- list(data.frame(a = 1:10, b = rnorm(10)),
           data.frame(a = 1:9, b = rnorm(9) + 5))
## create grouping variable
g <- rep(seq(along = x), sapply(x, nrow))
## if `x' has names then replace by
## g <- rep(names(x), sapply(x, nrow))
z <- cbind(do.call("rbind", x), g = g)

library(lattice)
trellis.device(theme = col.whitebg())
xyplot(b ~ a, z, groups = g, auto.key = list(space = "right"))

--sundar
Petr Pikal wrote: