Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Add test for AxisArtist#23534
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Add test for AxisArtist#23534
Conversation
assert math.isclose(tightbbox.height, 15.880208333333329) | ||
assert math.isclose(tightbbox.width, 518.0625) |
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.
Can these values be understood or do you just pin the current values?
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.
The latter. Although I guess one can probably figure them out.
Looking at similar tests there is the whole range from pinned values to computed to relative changes.
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.
As this is the bottomaxisline
, I think, then the width should be ~= the Axes width? Height is probably something like text (TTT) height + pad + linewidth, but that's a bit more difficult to put in.
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.
I'm ok pinning the current numbers as regression tests. But please add a comment on this so that we don't have to wonder later where these numbers came from.
I swapped to an image test here. However, it seems like matplotlib/lib/matplotlib/axes/_base.py Lines 4326 to 4332 in6383e43
AxisArtist is not in the tuple.This leads me to think that there is something missing here. Probably, rather than having an explicit list, which I assume should not include classes from mpl_toolkits, it may be better to have some property in the class? This will also allow user-defined classes to define themself to always be included here. (It is of course possible to redefine |
There is also an issue with the window extent for Should I open an issue with it or just drop it? |
At least for the AxisArtist, I think having it to override |
This was because the location of ticklabels may not be correctly updated at the time when |
PR Summary
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).