我想使用ggridges
.
# toy example
ggplot(iris, aes(x=Sepal.Length, y=Species, fill=..x..)) +
geom_density_ridges_gradient(jittered_points = FALSE, quantile_lines =
FALSE, quantiles = 2, scale=0.9, color='white') +
scale_y_discrete(expand = c(0.01, 0)) +
theme_ridges(grid = FALSE, center = TRUE)
我想在 7 处为Virginica 添加一条垂直线,为 versicolor 添加一条垂直线,为 5 为 setosa 添加一条垂直线。关于如何做的任何想法?