I have a bar plot:
p <- ggplot(data=df, aes(x=Gene, y=FC, fill=expt, group=expt))
p <- p + geom_bar(colour=\"black\", stat=\"identity\", position = pos
You can adjust the width outside of the position_dodge
as well (in geom_bar
),
ggplot(data=df, aes(x=Gene, y=FC, fill=expt, group=expt)) +
geom_bar(colour="black", stat="identity", position = position_dodge(width = 0.8), width=0.5) +
geom_errorbar(aes(ymax = FC + se, ymin = FC, group=expt),
position = position_dodge(width = 0.8), width = 0.25)
or
dodge <- position_dodge(width = 0.5)
ggplot(data=df, aes(x=Gene, y=FC, fill=expt, group=expt)) +
geom_bar(colour="black", stat="identity", position=dodge, width=0.5) +
geom_errorbar(aes(ymax = FC + se, ymin = FC, group=expt),
position = dodge, width = 0.25)