-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: register_matplotlib_converters leads to wrong datetime interpretation with matplotlib 3.3 #35350
Comments
@ZahlGraf do you see anything in the release notes that indicates what might have changed? |
Unfortunately not really. There are some changes to ticks, but they are not really related to dates: I also remember a deprecation warning about |
cc @jklymak on the hunch that this is related to the variable epoch changes in matplotlib/matplotlib#15008, but that's just a guess. I'll hopefully have time to look more closely later in the week. |
Yes our epoch changed from |
I don't know why pandas relies on matplotlib's epoch - presumably you use |
I can confirm, that using
|
Glad there is a workaround, and sorry for the inconvenience. I should have pinged pandas when the change went in. https://matplotlib.org/3.3.0/users/whats_new.html#dates-use-a-modern-epoch |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Problem description
The years in the plot are now 91 and 92.
Note: With
matplotlib 3.2.2
(the last stable release) the error is not there. So I guess this is a bug due to an api change insidematplotlib 3.3.0
.Expected Output
I expects the year 22 and 23 like in this image:
The second image can be produced by deleting the call to
register_matplotlib_converters()
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: