I have a histogram with percentages on the Y axis:
df <- data.frame(V1 = rnorm(100))
ggplot(df, aes(x = V1)) +
geom_histogram(aes(y = 100*(..count..)/sum(..count..)))+geom_density()
I tried to add a density curve using geom_density() but it appears to be on the wrong scale for the percentages. How can I fix this?