title: Trouble plotting legend/axis for matplotlib subplots
body: <p>So I have some data that I'm trying to plot in matplotlib. So my data has a few variables I'm trying to plot. What I want to do is for each location make a subplot, each subplot than has multiple groups which I want to show how the value changed over time. An example of my data is:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  import random
  
  df = pd.DataFrame({
                 "GEO": [1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3],
                 "year": [2010,2011,2010,2011,2010,2011,2010,2011,2010,2011,2010,2011,2010,2011,2010,2011,2010,2011],
                 "GROUP": ['doctor','doctor','Knight','Knight','Wizard','Wizard','doctor','doctor','Knight','Knight','Wizard','Wizard','doctor','doctor','Knight','Knight','Wizard','Wizard'], 
                  "Value": random.sample(xrange(100), 18)
  })
  
  provs = df["GEO"].unique()
  f, axarr = plt.subplots(len(provs), sharex=True, sharey=True)
  myplot = 0
  
  for prov in provs:
      groups = df.loc[df["GEO"] == prov, "GROUP"].unique()
      axarr[myplot].set_title(prov)
      for group in groups:
          x = df.loc[(df["GEO"] == prov) &amp; (df["GROUP"] == group), "year"].tolist()
          y = df.loc[(df["GEO"] == prov) &amp; (df["GROUP"] == group), "Value"].tolist()
          axarr[myplot].plot(x, y, label=group)    
      myplot = myplot + 1
  plt.legend(loc='center left', bbox_to_anchor=(1, 0.5))
  plt.xlabel('Year')
  plt.ylabel('Amount in $')
  plt.xlim(2010, 2011)
  plt.show()
  </code></pre>
  
  <p>So issues I'm having</p>
  
  <p>1) Trying to set the X Axis to show the year (so 2010 and 2011) instead of 0 - 1</p>
  
  <p>2) Trying to get my legend and axis labels centered (pretty sure doing this wrong for subplots).</p>
  
  <p><img src="https://i.stack.imgur.com/4Zjvu.png" alt="plot"></p>