有没有任何可能的方法,使点在一个方块节目,而不让它们重叠,如果它们不是唯一的?
目前:

我希望它看起来像这样(有颜色和其他特征):

我试过蜂巢,我得到了一个错误:Warning in f(...) : The default behavior of beeswarm has changed in version 0.6.0. In versions <0.6.0, this plot would have been dodged on the y-axis. In versions >=0.6.0, grouponX=FALSE must be explicitly set to group on y-axis. Please set grouponX=TRUE/FALSE to avoid this warning and ensure proper axis choice.
即使我有geom_beeswarm(grouponY=TRUE)
发布于 2022-04-25 10:10:21
对卡尔的回答稍作修改可能是:
tibble(x = "label", y = rnorm(100, 10, 10)) %>%
ggplot(aes(x, y)) +
geom_boxplot(outlier.shape = NA, alpha ) +
geom_jitter(width = 0.1)或者,您考虑过使用小提琴情节吗?它可以更有效地显示分布的密度,因为绘图的宽度与该级别周围数据点的比例成正比(对于y轴)。
https://stackoverflow.com/questions/71983980
复制相似问题