I am attempting to create a diverging stacked bar like here, and am experiencing a similar issue to this SO question. My approach is slightly different though as I am managing i
Although not intuitive (for me), use:
ggplot(x, aes(x = 1, y = order(count), fill = response)) + geom_col() + scale_fill_brewer(palette = "RdBu",direction=1) + coord_flip()
It takes into account the ordering based on response (rather than order(response))