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.
Is this what you were expecting?
qplot(x=wt, y=as.factor(mpg), data=mtcars) +
facet_grid(vs + am ~ ., scale="free", space="free")

print(p, vp=viewport(angle=-90))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With