user308827
user308827

Reputation: 21971

using rcparams in matplotlib to set major and minor locators

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

Answers (1)

ImportanceOfBeingErnest
ImportanceOfBeingErnest

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

Related Questions