如何更改 ggrorplot 中点的形状

How to change the shapes of the dots in the ggerrorplot

我想更改 ggpubr 图形中点的形状。 我的总体目标是我不想在打印时使用颜色。 我不太熟悉 ggpubr 图形,但我将它们用于星号。

如何改变点的形状?我需要 7 种不同的形状。输入参数 shape = "combi" 没有改变任何东西。 那我怎么才能得到我想要的呢?

ggerrorplot(subset_PUFA_together, x = "Lipid_Species", y = "isotopic_ratio",
                    add = "mean", error.plot = "errorbar", color = "combi", 
                                                            palette = c( "#009E73","#E69F00","#F0E442",
                                                                       "#0072B2", "#D55E00", "#CC79A7", "#000000"),
                    legend = "right",position = position_dodge(width=0.4),
                    size = 1.4, xlab = "", ylab = "") 

谢谢, 纳丁

PS: 玩玩的一些数据:

structure(list(Lipid_Species = structure(c(3L, 3L, 2L, 2L, 3L, 
6L, 4L, 6L, 2L, 5L), .Label = c("LIN", "ALA", "SDA", "EPA", "ARA", 
"DHA"), class = "factor"), isotopic_ratio = c(NA, -47.8432292, 
-40.4566585, -43.2375195, NA, NA, -41.1712774, NA, -38.7533203, 
-45.66419779), combi = structure(c(3L, 4L, 5L, 3L, 2L, 1L, 7L, 
2L, 2L, 3L), .Label = c("Fresh leaves", "Submerged leaves", "Epilithon", 
"Emphemeroptera (Grazer)", "Plecoptera (Shredder)", "Gammarus (Shredder)", 
"Plecoptera (Predator)"), class = "factor")), row.names = c(13802L, 
13874L, 71L, 4L, 14551L, 4956L, 5993L, 4921L, 779L, 887L), class = "data.frame")

如果将 add 更改为 jitter,则可以像这样更改 shape

library(ggpubr)
  ggerrorplot(subset_PUFA_together, x = "Lipid_Species", y = "isotopic_ratio",
              add = "jitter", error.plot = "errorbar", color = "combi", 
              palette = c( "#009E73","#E69F00","#F0E442",
                           "#0072B2", "#D55E00", "#CC79A7", "#000000"),
              legend = "right",position = position_dodge(width=0.4),
              size = 1.4, xlab = "", ylab = "", add.params=list(shape = "combi")) 

输出: