3
votes

I have the following code:

ggbarplot(Text1, x = "Page", y = "IA_REGRESSION_OUT_COUNT", 
          color = "Modified", add = "mean_se", fill = "Modified", 
          width = .6, position = position_dodge(0.8)) +  
  stat_compare_means(method = "t.test", aes(group = Modified), 
                     label = "p.signif", label.y = 0.3, na.rm = TRUE) + 
  labs(x = "Page number", y = "Avg Regression Count", 
       caption = "* = p value < 0.5; **** = p value < 0.0001") + 
  scale_color_manual(values=c("black", "black")) + 
  scale_fill_manual(values=c("#CCCCCC","#FFFFFF")) + 
  theme_minimal()

which produced this plot

Before

However, since today this is what comes out, maybe because some updates?

After

Any idea how to fix this and have it back with the error bars for each column?

2
Following this thread, you may need to update your version of ggpubr (it looks like a new version went up on CRAN a couple of weeks ago). - aosmith

2 Answers

1
votes

This has been fixed now. Please install the latest developmental version on GitHub( https://github.com/kassambara/ggpubr/issues/109) and try this:

library(ggpubr)
ggbarplot(ToothGrowth, x = "dose", y = "len", 
   add = "mean_se", 
   color = "supp", palette = "jco",
   position = position_dodge(0.8)
)

The generated plot should look like this:

enter image description here

1
votes

I found the solution. just add follow code.

add.params = list(group = "type"), position = position_dodge(0.8)