I'm not sure what Talib or MACD are, but I think you just need to replace your ax1.plot()
with ax1.hist(macd, bins=50)
. There are a bunch of options but provided macd
is just the set of data you want to bin and put into a histogram this should work.
The matplotlib documentation has enough to get you going an example:
http://matplotlib.org/api/pyplot_api.html#module-matplotlib.pyplot
you will need to Ctrl-f to find matplotlib.pyplot.hist
.
If instead your macd
is already binned then you may need to use ax1.bar()
instead: