-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ax.bar throws when x axis is pandas datetime #13186
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
Comments
That this worked before seems fortuitous, but not consistent with other dates. What units are 10 supposed to be in this example? I’m not clear on what pandas has for a timedelta, but that’s what we would expect for a date using other Datetimes with bar. Open to the idea that this behaviour still needs to be changed. I got talked into the current implementation, but maybe it’s wrong. |
Crossref #12903 |
? Are you sure that worked v3.0.2 w/o an error? It fails for me back to v2.2.3 (which is where I quit, because I would have to recompile)
|
@jklymak actually that specific example doesn't work on 3.0.2 - what did work then but fails now is slightly more complicated - I was grouping by my date column. I guess because the tpye of the grouped column is a
|
Given that the error is |
I suspect you really should be passing something more meaningful in as the width there, but since pandas allows it, we shouldn't break it. |
Yeah i agree - it's confusing that it appears to work in one case but not the other. Thanks |
Lets leave open until we get our fix in. #13187 will automatically close it... |
Bug report
Bug summary
ax.bar throws error when x-axis is datetime, behaviour has changed between current master (throws error) and version 3.0.2 (no error)
Code for reproduction
Actual outcome
Expected outcome
Matplotlib version
built matplotlib from source
The text was updated successfully, but these errors were encountered: