0

When i execute this piece of code the program produces [None, None, None,...]

I am expecting candlestick diagram

import matplotlib.finance as mpf
import matplotlib.pyplot as plt

start =(2014,5,1)    
end = (2014,6,30)

quotes = mpf.quotes_historical_yahoo_ochl('^GDAXI',start, end)
fig, ax=plt.subplots(figsize=(8,5))
fig.subplots_adjust(bottom=0.2)
mpf.candlestick_ochl(ax,quotes,width=0.6,colorup='b',colordown='r')
plt.grid(True)
ax.xaxis_date()
ax.autoscale_view()
plt.setp(plt.gca().get_xticklabels(),rotation=30)
Vlas Sokolov
  • 3,733
  • 3
  • 26
  • 43
abhi_phoenix
  • 387
  • 1
  • 5
  • 19

1 Answers1

0

You didn't actually show your plot on screen. When I copy your code and add

plt.show()

at the end of it, it runs just fine.

Community
  • 1
  • 1
Vlas Sokolov
  • 3,733
  • 3
  • 26
  • 43