Adjust the error bar in ggplot2::geom_bar to the right place

21 Views Asked by At

This is my R code:

data = read.csv("R_plot.csv", fileEncoding = "UTF-8")
                
ggplot(data, aes(x=Method, y=Ratio))+
  geom_bar(aes(fill = Group), stat="identity", position=position_dodge(width=0.5), width = 0.5)+
  geom_signif(y_position=c(0.6,0.7),xmin=c(0.85, 1.85), xmax=c(1.15,2.15),
              annotation=c("*","ns"), tip_length=0.04)+
  geom_errorbar(aes(ymin = Ratio-SE, ymax = Ratio+SE), width=0.1, position = position_dodge(width=0.5))

enter image description here

I tried to change the value of the width but it didn't work.

0

There are 0 best solutions below