Change "size" separately in ggbarplot for point and mean_se
SeadonXing opened this issue · comments
Thank you for this cool tool.
I want to change the size of point and the thicknes of mean_se in ggbarplot together. But I can't assign two "size" parameter in add.params. My question is how can I change the size of point and the thicknes of mean_se in ggbarplot at the same time by using same parameter "size"?
Example
library(ggpubr)
df1 = data.frame("group1" = rnorm(24, 20, sd = 2),
"group2" = rnorm(24, 30),
"group3" = rnorm(24, 40)
)
df1[1:6,] = df1[1:6,]/2
df1[7:12,] = df1[1:6,]/3
df1$Treatment = rep(c(paste("Tr", 1:3, sep = "")), each = 8)
dfm = melt(df1, id.vars = "Treatment")
Too thick for error bar
ggbarplot(dfm, x = "variable", y = "value", add = c("mean_sd", "point"),
color = "Treatment", fill = "Treatment", alpha = 0.5,
position = position_dodge(), add.params = list(color = "Treatment", size=3))
Too small for point
ggbarplot(dfm, x = "variable", y = "value", add = c("mean_sd", "point"),
color = "Treatment", fill = "Treatment", alpha = 0.5,
position = position_dodge(), add.params = list(color = "Treatment", size=0.5))