0

I've tried to come out with the historical chart using matplotlib, but the chart doesn't show the correct format.

plt.rc('figure', figsize=(15, 10))
  fig, axes = plt.subplots(2, 1, 
              gridspec_kw={'height_ratios': [3, 1]})
  fig.tight_layout(pad=3)

  date = data['Date']
  close = data['MClose']
  vol = data['MVolume']

  plot_price = axes[0]
  plot_price.plot(date, close, color=colors['blue'], 
  linewidth=2, label='Price')

  plot_vol = axes[1]
  plot_vol.bar(date, vol, width=15, color='darkgrey')

enter image description here

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158

0 Answers0