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. |
|
Hello, please review our AI policy and fill out the original Pull Request Template to let us know about your use of AI. Thanks! |
|
I have updated the PR description with the AI disclosure and the official template. The focused regression test passes, but the full CI image-comparison suites now report broad baseline-image changes across existing plots because the bottom x-tick alignment changes from top to baseline globally. I have not regenerated or committed a large set of expected images yet. Could you advise whether the intended direction is to make baseline alignment the new default and update the affected baselines, or to narrow the behavior to the reported custom-label case? |
PR summary
The bottom x-axis tick labels currently use top alignment. When custom formatters return labels with different heights, such as
pol.and1, their lower edges do not line up. This change uses baseline alignment for the bottom x-axis tick labels and adds a regression test for the mixed-height label case reported in #32316.Fixes #32316
AI Disclosure
I used AI assistance to inspect the repository, locate the relevant axis transform and test locations, and review the regression-test setup. I reviewed the final diff and the test output myself. The change is limited to the bottom x-axis text alignment and its regression test; no new dependency or public API is introduced.
PR quality check
Tests
python -m pytest lib/matplotlib/tests/test_axis.py::test_xtick_labels_share_baseline -q(passes with the patched transform; compiled extensions are unavailable in the sparse checkout, so the full source suite could not run locally)python -m compileall -q lib/matplotlib/axes/_base.py lib/matplotlib/tests/test_axis.pygit diff --check