title: Pandas Plotting Display all date values on x-axis (matplolib only displays few values) formatted as MMM-YYYY
body: <pre class="lang-py prettyprint-override"><code>import os
  import pandas as pd
  import matplotlib.pyplot as plt
  import datetime
  
  df = pd.read_excel(DATA_DIR+&quot;/&quot;+file_list[0], index_col=&quot;Date&quot;)
  df.head(5)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/kLkcS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kLkcS.png" alt="enter image description here" /></a></p>
  <pre><code>smooth = df['Pur. Rate'].rolling(window=20).mean()
  smooth.plot()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/OZi5E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OZi5E.png" alt="enter image description here" /></a></p>
  <p>I get the following graph and need to plot all the date values for every MONTH-YEAR on the x-axis.
  I want to display all the months and years formatted diagonally on the x-axis in the format (Feb-19). I can make the size of the plot larger to fit all as I will save it as jpg.</p>
  <p>I want the x-axis to have the following values:
  Jan 16, Feb 16, Mar 16, Apr 16, May 16, Jun 16, Jul 16, Aug 16, Sep 16, Oct 16, Nov 16, Dec 16, Jan 17, Feb 17 …
  (I want to display all these values, matplotlib automatically truncates this, I want to avoid that)</p>