title: Scatterplot of two Pandas Series, coloured by date and with legend
body: <p>I am studying financial time series, in the format of pandas series. To compare two series I do a scatterplot, and to visualise the time evolution in the scatterplot I can colour them. This is all fine.</p>
  
  <p>My question relates to the legend showing the colours.
  I would like the legend to show the date/year that the colour corresponds to, rather than just an the index of the data entry, as now. But I haven't been able to do this, or to find a question like this on stackoverflow.</p>
  
  <p>I know the time series knows the dates, and if you just plot a time series, the x-axis will show the dates.</p>
  
  <p>My code is</p>
  
  <pre><code>from pandas_datareader import data as web
  import matplotlib.pyplot as plt
  import pandas as pd
  
  #Download data
  start = '2010-1-1'
  end = '2016-10-1'
  AAPL = web.DataReader('AAPL', 'yahoo', start=start, end=end)['Adj Close']
  TSLA = web.DataReader('GOOG', 'yahoo', start=start, end=end)['Adj Close']
  
  #Scatterplot
  plt.scatter(AAPL, TSLA, alpha=.4, c=range(len(AAPL)))
  plt.colorbar()
  plt.xlabel("AAPL")
  plt.ylabel("TSLA")
  plt.grid()
  plt.show()
  </code></pre>
  
  <p>This code produces this plot:
  <a href="https://i.stack.imgur.com/KjU2w.png" rel="nofollow">Scatterplot with colours and legend</a></p>
  
  <p>Thanks</p>