I have plot like this:
And I want to change the ticks for 12 positions indicating the respective months in this format : Jan-Feb_Mar...
When I am using the MonthLocator funciton the ticks dispappear from plot
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'))
I do not know where is the error in this code. Thanks