I have a plot like this, made from:
plot = ggplot(dat, aes(x=Nest)) + geom_bar(aes(fill=MotherID), position = position_stack(reverse = TRUE)) + facet_wrap(~Year) + scale_fill_grey(start = 0, end = .9) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) + theme(legend.position="none") + ylab("Number of offpsring")
I'd like all the bars to be next to each other without the gaps between them at like 3, 4, 9 on the x axis. I guess it is because nest is a number rather than a string.
I have dat$nest = as.factor(dat$nest)