Reputation: 21971
from matplotlib.dates import DateFormatter, YearLocator, MonthLocator
ax.xaxis.set_major_locator(YearLocator())
ax.xaxis.set_minor_locator(MonthLocator(bymonthday=1, interval=2))
Is it possible to set the code above using matplotlib rcparams?
Upvotes: 0
Views: 392
Reputation: 339280
No. You cannot control the locator via matplotlib rc. The default is always an AutoDateLocator
.
All valid matplotlib rc parameter are shown in the example file https://matplotlib.org/users/customizing.html.
Upvotes: 1