更新时间:2022-10-22 22:39:19
You should move the argument fill=variable
inside the ggplot()
call to ensure that geom_errorbar()
also use variable
as the dodging variable.
ggplot(data=dm,aes(y=value,x=concentration,fill=variable))+
geom_bar(position = position_dodge(),
stat="identity") +
geom_errorbar(aes(ymin=value-sd,ymax=value+sd),
position=dodge,width=0.1,size=0.3)+
ylab("mu_max [h-1]") +
scale_x_discrete(limits=c("0","0.5x","1x","5x","10x","100x"))