而在Beeswarm图中,将这些重复的点分散开,变成邻近的点。...,pwcol和pwbg来控制每个单独数据点的“逐点”特性,这里可以给每个点赋值颜色参数
xlab = "", ylab = "Follow-up time (months)",
labels...legend("topright", legend = c("Yes", "No"), #右上角图例
title = "Censored", pch = 16, col = 1:2) # pch 图例中点的形状...将beeswarms与 "boxplot"或 "bxplot"结合起来
boxplot(len ~ dose, data = ToothGrowth,
outline = FALSE,...sub_mpg, aes(class, displ, color=factor(cyl))) +
geom_beeswarm(dodge.width=0.5)
小编总结:
虽然方法很简单,但是只要我们根据自己的数据仔细调整颜色和背景等