ggpubr均值标签未针对每个分组的箱线图显示

时间:2019-08-28 07:38:20

标签: r boxplot ggpubr

您好,所有人正在寻求帮助,

我想在组中的每个箱线图上添加一个中间标签:

当前图片的图像:boxplot mean for each group

试图添加aes(group = Term),但不确定将其放置在何处

库(ggpubr)

ggboxplot(dataset, x = "Faculty", y = "Measure",
color = "Term", palette = "jco")+
stat_compare_means(aes(group = Term), label = "p.format")+
stat_summary(fun.data = function(x) data.frame(y=6.5, label = 
paste("M",round(median(x),2))), geom="text")

0 个答案:

没有答案