You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Matplotlib tick-label warning with pandas 3.1.0 #582
I got this warning after upgrading to pandas 3.1.0:
/path/to/python314/lib64/python3.14/site-packages/quantstats/_plotting/core.py:266: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator. Otherwise, ticks may be mislabeled.
ax.set_xticklabels(df.index.year)
Pandas 3.1 introduced dynamic date ticks for datetime-indexed bar plots. Converting the plotting index to strings restores categorical tick positioning while preserving the original DataFrame and existing year-labeling logic.
This eliminates the warning without changing the plotted returns or chart appearance.
Activity