Created
February 13, 2017 19:37
-
-
Save ggada/ab29de2d5cba462add0dfff209b97433 to your computer and use it in GitHub Desktop.
Linear regression line - 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
ggplot(height, aes(x=fheight, y=sheight)) + | |
geom_point(size=0.2) + | |
stat_smooth(method = lm) + | |
xlab("Father's height") + | |
ylab("Son's height") + | |
ggtitle("Son's height vs. Father's height") + | |
theme(plot.title = element_text(hjust = 0.5)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment