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 = position_dodge(width = 0.9))
p <- p + geom_errorbar(aes(ymax = FC + se, ymin = FC, group=expt),
position = position_dodge(width = 0.9), width = 0.25)
p
I want to increase the spacing between bars (for each bin). I've tried messing around with the position_dodge(width = ...)
but it skews my error bars:
There are several other questions that relate to this:
- This question has an answer that seems to do the trick (but difficult to implement)
- When I use the answer to this question I get the following:
i.e it seems to increase the between bins, but at the expense of overlapping with the neighbouring bar