-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Clarify FigureBase.tight_bbox as different from all other artists. #21286
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
Conversation
@@ -1598,6 +1598,9 @@ def get_tightbbox(self, renderer, bbox_extra_artists=None): | |||
""" | |||
Return a (tight) bounding box of the figure in inches. | |||
|
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 previous sentence says the box will be in inches. Maybe combine these the old and new sentences?
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.
reworded
It explicitly scales the union of child tightbboxes by 1/dpi, i.e. converts from pixels to inches. Perhaps that's not the most elegant design, but let's make that behavior clear.
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.
Anyone can merge once the docs build.
…ent from all other artists.
…286-on-v3.5.x Backport PR #21286 on branch v3.5.x (Clarify FigureBase.tight_bbox as different from all other artists.)
DOC: Clarify FigureBase.tight_bbox as different from all other artists.
DOC: Clarify FigureBase.tight_bbox as different from all other artists.
It explicitly scales the union of child tightbboxes by 1/dpi, i.e.
converts from pixels to inches. Perhaps that's not the most elegant
design, but let's make that behavior clear.
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).