首页 > 解决方案 > gg_boxplot 中的彩色点,没有分隔框

问题描述

这可能是基本的,但我被卡住了。

使用 ggpubr,我想按颜色指示分组,但不希望根据颜色指示的组仅通过 x 变量的分组来制作框。

谢谢您的帮助!

library(tidyverse)
library(ggpubr)
dings <- tribble(
  ~a,~b,~c,
  1,"one","b",
  2,"one","a",
  5,"two","b",
  1,"two","b",
  2,"three","a",
  5,"three","b",
  1,"one","b",
  2,"one","a",
  6,"two","b",
  1.5,"two","b",
  3.5,"three","a",
  4,"three","b"
)

ggboxplot(dings,
          x="b", y="a",color = "c",add = "jitter")

阴谋

标签: ggpubr

解决方案


推荐阅读