I have below histogram with ggplot
library(ggplot2)
set.seed(1)
df <- data.frame(PF = 10*rnorm(1000))
ggplot(df, aes(x = PF)) +
geom_histogram(aes(y =..density..),
breaks = seq(-50, 50, by = 10),
colour = "black",
fill = "white") +
stat_function(fun = dnorm, args = list(mean = mean(df$PF), sd = sd(df$PF)))
Now I want to fill the normal density curve with some colour. I tried below without success
stat_function(fun = dnorm, args = list(mean = mean(df$PF), sd = sd(df$PF)), fill = 'red', alpha = 0.50)
Is there any way to apply fill colour the area under normal density curve?