On Thu, Jul 10, 2008 at 3:28 PM, Jim Price <[EMAIL PROTECTED]> wrote: > > Playing with ggplot, something I'd promised myself I'd get around to. I've > the following scenario: > > library(lattice) > library(ggplot2) > > myData <- data.frame( > x = rnorm(100), > y = rnorm(100), > group = 1:4 > ) > > xyplot(y ~ x | factor(group), data = myData, layout = c(2, 2)) > > qplot(x, y, facets = ~ group, data = myData) > > > > In this code the lattice example gives me a 2x2 layout, whereas the ggplot > example gives me a 1x4 layout, as per the facets specification. Can I mimic > the effect of the layout parameter in xyplot inside qplot? Apologies if I've > missed an obvious help-page somewhere!
Not yet, but I'm working on that code at the moment, and it should be (fingers crossed) included in the next ggplot2 release. Currently, ggplot assumes you want a grid of facets defined by separate variables in the x and y dimensions. Hadley -- http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.