[R] facet_grid problem: don't understand error message

2009-05-26 Thread Etches Jacob
The following is a plot that used to work (last December, I think with a patched version of ggplot2 from Hadley), but has stopped working with recent updates. Other instances of facet_grid work and the data look normal to me. Since I have no idea what caused the error message, I'm having

[R] ggplot2: specifying legend titles

2009-03-20 Thread Etches Jacob
I am trying to specify a legend title to be other than the variable name, but I find that the legend splits because scale_shape() takes effect but scale_colour() does not. Can someone spot my error? Here's some toy code that produces the problem on my system (R2.8.1, windows, today's CRAN

[R] ggplot2: can one have separate ylim for each facet?

2008-11-17 Thread Etches Jacob
In lattice #toy data library(ggplot2) library(lattice) x <- rnorm(100) y <- rnorm(100) k <- sample(c("Weak","Strong"),100,replace=T) j <- sample(c("Tall","Short"),100,replace=T) w <- data.frame(x,y,j,k) xyplot(y~x|j+k,scales=list(y=list(relation="free"))) will give you a scale in each subplot w