title: Matplotlib Plotting: AttributeError: 'list' object has no attribute 'xaxis'
body: <p><a href="https://i.stack.imgur.com/s5UH8.png" rel="nofollow noreferrer">Example Plot that needs to format date</a> </p>
  
  <p>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 <code>AttributeError</code>. </p>
  
  <p>The same code worked while plotting the OHLC graph, but somehow this doesn't work now. </p>
  
  <p><strong>AttributeError: 'list' object has no attribute 'xaxis'</strong></p>
  
  <pre><code>    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'))
  </code></pre>