title: Adding second legend to scatter plot
body: <p>Is there a way to add a secondary legend to a scatterplot, where the size of the scatter is proportional to some data?</p>
  
  <p>I have written the following code that generates a scatterplot. The color of the scatter represents the year (and is taken from a user-defined df) while the size of the scatter represents variable 3 (also taken from a df but is raw data):</p>
  
  <pre><code>import pandas as pd 
  
  colors = pd.DataFrame({'1985':'red','1990':'b','1995':'k','2000':'g','2005':'m','2010':'y'}, index=[0,1,2,3,4,5])
  
  fig = plt.figure()
  ax = fig.add_subplot(111)
  
  for i in df.keys():
      df[i].plot(kind='scatter',x='variable1',y='variable2',ax=ax,label=i,s=df[i]['variable3']/100, c=colors[i])
  
  ax.legend(loc='upper right')
  ax.set_xlabel("Variable 1")
  ax.set_ylabel("Variable 2")
  </code></pre>
  
  <p>This code (with my data) produces the following graph:</p>
  
  <p><a href="https://i.stack.imgur.com/RxF1Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RxF1Q.png" alt="Representative figure with single legend"></a></p>
  
  <p>So while the colors/years are well and clearly defined, the size of the scatter is not. </p>
  
  <p>How can I add a secondary or additional legend that defines what the size of the scatter means?</p>