I want the negative bars to be facing downwards, and the positive upwards, with the x-axis(0-line) passing right between them. I tried this
chart = fig.bar(x, negative_data, width=35, color='r')
ax2 = plt.gca().twinx()
ax2.bar(x, positive_data, width=35, color='b')
But instead, I get merged red and white bars, both facing downwards. It seems that the arrays negative_data/positive_data only specify the height of the bar, but how do I specify the orientation? I need something to specify the coordinates of the tops of each bar.
Also, how do I make the widths be something reasonable, possibly dynamic as the graph is resized by user?
Here is an example of problematic widths:
x = [250, 1500, 2750, 4250, 6000, 8500, 13200]
negative_data = [0, 0, 0, 0, 0, 0, 0]
positive_data = [3, 0, 0, 0, 1, 0, 0]
How can I make the plot of those look nice?