Example Plot that needs to format date
I am trying to plot stock prices against time (see above). The code below does plot the "OPEN" prices but as I try to format the X-axis dates from ordinal to ISO dates, it throws AttributeError.
The same code worked while plotting the OHLC graph, but somehow this doesn't work now.
AttributeError: 'list' object has no attribute 'xaxis'
df_copy = read_stock('EBAY')
fig = plt.figure(figsize= (12,10), dpi = 80)
ax1 = plt.subplot(111)
ax1 = plt.plot(df_copy['Date'], df_copy['Open'], label = 'Open values' )
ax1.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
df_copy.set_index('Date').Open.plot(label='Open values')