title: Seaborn Plot - Wrong Dates on X Axis
body: <p>I have a dataframe that associates each date with multiple values. The date range is from 02-02 to 04-30.</p>
  <p>I have a dataframe with two columns -- 'Date' and 'Score'. The 'Date' entries are timestamps.</p>
  <pre><code> dem_data = {Timestamp('2020-02-02 22:27:00+0000', tz='UTC'): [0.5423],
               Timestamp('2020-02-02 18:52:09+0000', tz='UTC'): [-0.1027],
               Timestamp('2020-02-02 21:26:46+0000', tz='UTC'): [0.4939],
               Timestamp('2020-02-03 18:35:43+0000', tz='UTC'): [0.8074],
               Timestamp('2020-02-03 22:45:00+0000', tz='UTC'): [-0.7845],
               Timestamp('2020-02-03 18:39:47+0000', tz='UTC'): [0.9081],
               Timestamp('2020-02-04 05:43:06+0000', tz='UTC'): [0.8402],
               Timestamp('2020-02-04 19:31:46+0000', tz='UTC'): [0.8316],
               ...}
  </code></pre>
  <p>I converted the Timestamp values to shortened string versions and made these values the indices for the dataframe.<br />
  <img src="https://i.stack.imgur.com/eRIhS.png" alt="1" /></p>
  <p>Here's the code I wrote to plot the data:</p>
  <pre><code>fig_dims = (9, 6)
  fig, ax = plt.subplots(figsize=fig_dims)
  ax = sns.lineplot(x=dem_data.index, y='Score', data=dem_data, ax = ax)
  ax.set_facecolor('white')
  freq = int(10)
  ax.set_xticklabels(concatenated.iloc[::freq].Date)
  xtix = ax.get_xticks()
  ax.set_xticks(xtix[::freq])
  fig.autofmt_xdate()
  plt.tight_layout()
  plt.show()
  </code></pre>
  <p>And here's the resulting image.<br />
  <img src="https://i.stack.imgur.com/N0WhF.png" alt="2" /></p>
  <p>A few things are strange about this.</p>
  <ol>
  <li>The x-axis is labeled as 'fake-date', the name of my index column, which includes shortened string versions of the timestamps in the 'dates' column. However, it displays the full timestamp, which I did not want.</li>
  <li>The x-axis only displays dates between 02-02 and 02-12.</li>
  </ol>
  <p>How can I get the axis to display all dates (and in a way that is legible)?</p>