GeezerVison is showing github.com — DOC: Note AutoDateLocator date precision limits in units guide by vineoy · Pull Request #32566 · matplotlib/matplotlib
Conversation
vineoy
commented
Nov 2, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
PR summary
Following review feedback, the AutoDateLocator documentation now carries a short one-line note on the precision limits of matplotlib dates, linking to the explanation in the Plotting dates and strings explainer (galleries/users_explain/axes/axes_units.py), which is where the detailed discussion now lives. The original scope followed timhoffm's suggestion in #23493.
Because matplotlib dates are stored as floats of days since the epoch, nanosecond range timestamps lose their detail: close values collapse and the autoscaled view then spans years. I reproduced this locally and plotting the elapsed time as numpy.timedelta64 values gives a usable axis. The explainer section documents these limits and the options and links to the existing Date precision and epochs example.
Closes #23493
AI Disclosure
I used an AI coding assistant to explore the codebase and to run local experiments that verified the behavior documented here. I reviewed the docstring note and this PR text before submitting and the pre-commit checks pass locally on this branch.
PR quality check
- Use an expressive title, e.g. "Fix title font property precedence"
- [N/A] New and changed code is tested (docstring only, no code change)
- [N/A] Plotting related features are demonstrated in an example
- [N/A] New features and API changes have release notes
- Documentation complies with general and docstring guidelines
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process.
You can also join us on discourse chat for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.
We strive to be a welcoming and open project. Please follow our Code of Conduct.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Move the detailed explanation of Date resolution limits from the
AutoDateLocator docstring to the "Plotting dates and strings" explainer
page, and shorten the docstring note to a single sentence that links
there, as suggested in the review.
vineoy
changed the title
DOC: Note AutoDateLocator date precision limits
DOC: Note AutoDateLocator date precision limits in units guide
Nov 3, 2026
vineoy
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Done in e1c73ea - the AutoDateLocator note is now the shortened one-liner linking to the guide and the detailed explanation (including the nanosecond-timestamp example and the timedelta64 / set_epoch options) moved to the Date conversion section of the "Plotting dates and strings" explainer (galleries/users_explain/axes/axes_units.py).
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch has not been deployed
No deployments
Reviewers
At least 1 approving review is required to merge this pull request.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|