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
timhoffm
left a comment
There was a problem hiding this comment.
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_tightbboxwould find a non-finite bbox because text's bbox was not defined. This ignores such bbox's when getting the axes bbox.PR Checklist