Repository navigation
Conversation
|
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. We strive to be a welcoming and open project. Please follow our Code of Conduct. |
timhoffm
left a comment
There was a problem hiding this comment.
I'd rather have this explained in https://matplotlib.org/stable/users/explain/axes/axes_units.html
The note here should be shortend to something like
Date resolution is limited to approximately a microsecond. For details see [link].
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.
|
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 |
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