Created
June 22, 2016 21:22
-
-
Save sebastiansauer/71a0398470a733760c08daa9c46af20b to your computer and use it in GitHub Desktop.
plot normal distribution with ggplot2, simply
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
# plot normal distribution with ggplot2, simply | |
library(cowplot) | |
p1 <- ggplot(data = data.frame(x = c(-3, 3)), aes(x)) + | |
stat_function(fun = dnorm, n = 101, args = list(mean = 0, sd = 1)) + ylab("") + | |
scale_y_continuous(breaks = NULL) | |
p1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment