Created
May 23, 2011 23:25
-
-
Save kohske/987847 to your computer and use it in GitHub Desktop.
example for feature/coord-manual-lim in ggplot2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lims <- data.frame(vs=c(0,0,1,1), am=c(0,1,0,1), | |
xmin=c(6,2,2,2), xmax=c(10,10,6,4), ymin=c(10,15,17,21),ymax=c(20,26,25,34)) | |
#ggplot(mtcars, aes(cyl, mpg)) + geom_point() + | |
# facet_grid(~vs+am, scale="free", lims=lims) # does not work with facet_grid | |
ggplot(mtcars, aes(cyl, mpg)) + geom_point() + | |
facet_wrap(~vs+am, scale="free", coord.limits=lims) + coord_cartesian(wise=T) # please try also wise=F |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment