title: How to set_xticklabels to corresponding "dates" column of a pandas DataFrame?
body: <p><strong>The issue</strong></p>
  
  <p>I have a pandas dataframe with two columns of data and corresponding date times in another column. I want to make a line plot for the two sets of data and have the date times, which is a list of strings, as the x-axis tick labels. But when I make the plot, the tick labels don't align with the corresponding data for that date. Instead the xlabels just come from the first n entries of the dates column.</p>
  
  <p>My original program had a tick at every data point, so I tried setting ax.set_xticks to reduce the number of ticks, and that's when this issue arose.</p>
  
  <p><strong>The code</strong></p>
  
  <pre><code>import numpy             as     np
  import datetime
  import pandas            as     pd
  import matplotlib.pyplot as     plt
  % matplotlib inline
  
  data = { 'Set1': np.random.rand(24),
           'Set2': np.random.rand(24)
         }
  df = pd.DataFrame(data,columns=['Set1','Set2'])
  
  date_list = []
  base = datetime.datetime(2000,1,1,0)
  for i in range(len(df.Set1)):
      date = base + datetime.timedelta(hours=i*3)
      date_frmt = date.strftime("%b%d%Hz")
      date_list.append(str(date_frmt))
  df['Dates'] = date_list
  
  print(df)
  </code></pre>
  
  <blockquote>
  <pre><code>    Set1      Set2      Dates
  0   0.521824  0.371057  Jan0100z
  1   0.726503  0.945712  Jan0103z
  2   0.881100  0.725798  Jan0106z
  3   0.432198  0.549191  Jan0109z
  4   0.083255  0.297057  Jan0112z
  5   0.428145  0.441973  Jan0115z
  6   0.168049  0.411889  Jan0118z
  7   0.654588  0.822227  Jan0121z
  8   0.540984  0.824515  Jan0200z
  9   0.999410  0.809121  Jan0203z
  10  0.055359  0.901241  Jan0206z
  11  0.163407  0.085901  Jan0209z
  12  0.523488  0.011856  Jan0212z
  13  0.133038  0.881413  Jan0215z
  14  0.880946  0.301656  Jan0218z
  15  0.575265  0.972408  Jan0221z
  16  0.489332  0.399983  Jan0300z
  17  0.119246  0.216152  Jan0303z
  18  0.805346  0.873699  Jan0306z
  19  0.806190  0.277772  Jan0309z
  20  0.868357  0.311854  Jan0312z
  21  0.042386  0.461695  Jan0315z
  22  0.354832  0.262534  Jan0318z
  23  0.209049  0.780153  Jan0321z
  </code></pre>
  </blockquote>
  
  <pre><code> ax = df.plot(figsize=(10, 5))
   ax.set_xticklabels(df.Dates)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/PulDy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PulDy.png" alt="enter image description here"></a></p>
  
  <p><strong>The problem</strong></p>
  
  <p>How do I get the ticks' labels to align correctly with their corresponding data?</p>