I make a candlestick with two data sets: [open, high, low, close] and volume. I am trying to overlay volumes at the bottom of the diagram as follows:

I call volume_overlay3 , but instead of bars, it fills the entire chart area. What am I doing wrong?

My other option is to use .bar (), which has no colors up and down, but will work if I could get the scale correctly:

fig = plt.figure() ax = fig.add_subplot(1,1,1) candlestick(ax, candlesticks) ax2 = ax.twinx() volume_overlay3(ax2, quotes) ax2.xaxis_date() ax2.set_xlim(candlesticks[0][0], candlesticks[-1][0]) ax.yaxis.set_label_position("right") ax.yaxis.tick_right() ax2.yaxis.set_label_position("left") ax2.yaxis.tick_left()
nathancahill
source share