first post here, so: Thanks a lot for this cool package!
My question: I have boxplots in a horizontal facet grid. Works fine:
set <- factor(rep(1:3, each=40), labels=c("Compound A","Compound
B","Vehicle"))
animal <- factor(rep(1:6, each=20),
labels=c("T36","T41","T34","T60","T23","T61"))
result <- rnorm(120)
test <- data.frame(set, animal, result)
p <- ggplot(test, aes(animal, result))
p + layer(geom= "boxplot") + facet_grid(. ~ set, space="free",
scales="free_x")
Now I'd like to rotate the layout by 90 degrees to have horizontal
boxplots arranged in a vertical grid, similar to Fig. 7.6 in the
gglpot2 book.
I tried:
p + layer(geom= "boxplot") + coord_flip() + facet_grid(set ~ .,
space="free", scales="free_x");
Now the '"space="free", scales="free_x"' doesn't work any more. Each
facet wastes space for all six animals. Any ideas?
Thanks
Thomas
- Bahama
The problem is that I've never figured out how free scales and
coordinate systems should interact, and so all coordinate systems
apart from the basic coord_cartesian() cause free scales to be
ignored.
Unfortunately I don't have any bright ideas on how to work around it.
Hadley
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> To post to this group, send email to ggp...@googlegroups.com
> To unsubscribe from this group, send email to
> ggplot2+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ggplot2
>
> To unsubscribe, reply using "remove me" as the subject.
>
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/