谢谢你增加了预期的yields ;在我看来,这是一个蜂拥而至的地块.
# install.packages("beeswarm")
library(beeswarm)
sorted <- sort(rnorm(100000))
dots <- c(rep(0, 100))
for (i in (1:100)){
dots[i] <- sorted[i*1000-500]
}
beeswarm(data.frame(dots),
horizontal = TRUE)
创建于2024-02-05与reprex v2.1.0
用红色的原创圆点进行比较:
beeswarm(data.frame(dots),
horizontal = TRUE)
# add the original points
points(data.frame(dots, 1.1), col = "red")
创建于2024-02-05与reprex v2.1.0
如果你研究蜂群方案(https://rdrr.io/cran/beeswarm/man/beeswarm.html),你可以使用不同的方法(method = c("swarm", "compactswarm", "center", "hex", "square")
)和不同的优先级(priority = c("ascending", "descending", "density", "random", "none")
).您也可以更改间距,使点不会接触,但要注意,间距可能会改变x位置和y位置.无论如何,你应该能够调整你的情节,以获得你想要的结果.