I have some data dt = data.table(x=c(1:200),y=rnorm(200))
and I start with a density plot using ggplot2
:
plot = ggplot(dt,aes(y)) + geom_density(aes(y=..density..))
Is there a way I can add percentile lines similar to this?
If further I could shade the segments of the graph (created by the percentile lines) similar to this, then that would be great!