title: Python - x-axis labels not lining up with tick marks
body: <p>I've successfully created the code to generate a bunch of charts. However, the x axis labels are slightly offset (to the left) from the x axis tick marks.</p>
  
  <p><strong>Dataframe</strong></p>
  
  <pre><code>  stationId       date variable  value  prefix uom
  0    site 1 2016-04-07       pH   6.90     NaN  pH
  1    site 1 2016-07-11       pH   6.80     NaN  pH
  2    site 1 2017-10-09       pH   6.80     NaN  pH
  3    site 1 2017-10-09       pH   6.80     NaN  pH
  4    site 1 2016-06-29       pH   6.79     NaN  pH
  </code></pre>
  
  <p>Full dataframe <a href="https://1drv.ms/u/s!AtIBhz_rxzgj8BpwXdPcX2Y1bouZ" rel="nofollow noreferrer">here</a></p>
  
  <p>There is nothing in the code which i can see why this should happen.</p>
  
  <pre><code>    #plot
  for line,group in linedf.groupby(['variable']):
      x = group['date']
      ax1 = group.plot(x='date', figsize=(8.2,4.5),linestyle='--',
                       linewidth=0.75,rot=0,marker='o',markersize=3)
  
      #set axis labels and chart title
      plt.title("chartTitle", fontsize=12)
      ax1.set_xlabel('Date', fontsize=10)
      ax1.set_ylabel('GWL (mAHD)',fontsize=10)
  
      #set text font
      rcParams['font.family'] = 'serif'
      rcParams['font.serif'] = ['Cambria']
  
      #set dates for x tick labels
      years = mdates.YearLocator()   # every year
      months = mdates.MonthLocator()  # every month
      yearsFmt = mdates.DateFormatter('%Y')
  
  
      lgd = plt.legend(bbox_to_anchor=(0.0 ,-0.13, 1.0, -0.03), 
                       loc=2,ncol = 6, mode="expand", borderaxespad=0.0,shadow=True)
  
      plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/AQU6Y.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AQU6Y.jpg" alt="x-axis not lining up with ticks"></a></p>