I'm trying to shade the area under the curve to the right of a given x, which is not the same for all the density plots, but it varies according to the level of y. For example,
On the package vignette I can only find solutions to shade the areas according to quintiles, but it's not what I'm trying to do (I have cutoffs generated from some modelling).
Any ideas?
library("ggplot")
library("ggridges")
diamonds %>%
ggplot(aes(x = x, y = cut)) +
geom_density_ridges()