Last active
January 22, 2016 10:52
-
-
Save gireeshkbogu/c068b5e8b9f6079d83eb to your computer and use it in GitHub Desktop.
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
require(ggplot2) | |
require(reshape2) | |
mtcars2 = melt(mtcars, id.vars='mpg') | |
ggplot(mtcars2) + | |
geom_jitter(aes(value,mpg, colour=variable),) + geom_smooth(aes(value,mpg, colour=variable), method=lm, se=FALSE) + | |
facet_wrap(~variable, scales="free_x") + | |
labs(x = "Percentage cover (%)", y = "Number of individuals (N)") | |
# useful links: | |
# http://stackoverflow.com/questions/25752909/multiple-ggplot-linear-regression-lines | |
Author
gireeshkbogu
commented
Jan 22, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment