title: MonthLocator in Matplotlib
body: <p>I have plot like this: </p>
  
  <p><a href="https://i.stack.imgur.com/TZVdW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TZVdW.png" alt="enter image description here"></a></p>
  
  <p>And I want to change the ticks for 12 positions indicating the respective months in this format : Jan-Feb_Mar...</p>
  
  <p>When I am using the MonthLocator funciton the ticks dispappear from plot</p>
  
  <pre><code>ax = plt.gca()
  ax.set_xlim([0, 365])
  ax.xaxis.set_major_locator(MonthLocator())
  ax.xaxis.set_minor_locator(MonthLocator(bymonthday=15))
  ax.xaxis.set_major_formatter(ticker.NullFormatter())
  ax.xaxis.set_minor_formatter(dates.DateFormatter('%b'))
  </code></pre>
  
  <p>I do not know where is the error in this code. Thanks</p>