Reputation: 13443
I would like to rotate a complete ggplot object 90°.
I do not wish to use coord_flip
as this appears to interfere with scale="free"
and space="free"
when using facets.
For example:
qplot(as.factor(mpg), wt, data=mtcars)+
facet_grid(.~vs + am, scale="free",space="free")
vs
qplot(as.factor(mpg), wt, data=mtcars)+
facet_grid(vs + am ~ ., scale="free",space="free")+
coord_flip()
What I would like:
I would likely need to use gridExtra
.
Upvotes: 10
Views: 11415
Reputation: 8717
Is this what you were expecting?
qplot(x=wt, y=as.factor(mpg), data=mtcars) +
facet_grid(vs + am ~ ., scale="free", space="free")
Upvotes: 2