【发布时间】:2018-01-23 02:38:28
【问题描述】:
我想使用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 添加一条垂直线。关于如何做到这一点的任何想法?
【问题讨论】:
标签: r ggplot2 ggridges ridgeline-plot