-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: ignore non-finite bbox #12651
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
FIX: ignore non-finite bbox #12651
Conversation
Why not let |
@Tillsten you mean I think I'll do that for the base |
b8ba0c0
to
927b7c6
Compare
@Tillsten added the check in both places now. The one in |
927b7c6
to
07ac112
Compare
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.
Returning None
instead of an infinite BBox
is an API change. I'm -1 on that as I don't see any benefit. In contrast, it obscures information. An infinite BBox
is a defined object. You can e.g. still find out if the width or height is infinite.
Yeah I’m flexible about that. The original PR didn’t have this - it just checked for finite bbox widths and heights. OTOH it’s not necessarily a bad idea to invalidate things we know we can’t do anything with. A NaN bbox width is not going to mean anything and pushing all the checks to a higher level just means more checks at a higher level. |
You'll have a new Edit: Would need careful consideration on the actual naming of such a method. |
Right but we already check for None. Not sure why, though. |
07ac112
to
d2523e0
Compare
d2523e0
to
49570b4
Compare
Removed |
Has been addressed and API is not changed.
…651-on-v3.0.x Backport PR #12651 on branch v3.0.x (FIX: ignore non-finite bbox)
PR Summary
closes #12648
Previously,
ax.get_tightbbox
would find a non-finite bbox because text's bbox was not defined. This ignores such bbox's when getting the axes bbox.PR Checklist