title: How do I sort my x-axis by ascending month order?
body: <p>So I have a dataframe with the indices as datetime objects. 
  <a href="https://i.stack.imgur.com/LMZTA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LMZTA.png" alt="Image1"></a>
  I have created a new column to indicate which month each 'ride' in the dataframe is in:</p>
  
  <pre><code>import numpy as np
  import datetime as dt
  from datetime import datetime    
  months = df.index.to_series().apply(lambda x:dt.datetime.strftime(x, '%b %Y')).tolist()
  df['months'] = months
  df1 = df[['distance','months']]
  </code></pre>
  
  <p>Which gives:</p>
  
  <p><a href="https://i.stack.imgur.com/KQwk1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KQwk1.png" alt="image2"></a></p>
  
  <p>When I try to plot it onto a line graph using seaborn using months as the x-axis, it sorts it in alphabetical order, starting with april then august, etc.</p>
  
  <pre><code>l = sns.lineplot(x='months',y='distance',data=df1)
  plt.xticks(rotation=45)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/mAF7C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mAF7C.png" alt="image3"></a></p>
  
  <p>I don't really understand why it does this as in the dataframe that I use, the months are sorted in ascending order according to their months. Is there a way I can make it so my x-axis starts with Jan2018 and ends in July2019?</p>