| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| bb.append(a.get_window_extent(renderer)) | ||
| x, y = a.get_position() | ||
| if np.isfinite(x) and np.isfinite(y): | ||
| bb.append(a.get_window_extent(renderer)) |
There was a problem hiding this comment.
Spent ~2s thinking about this but in general wouldn't it be better to first get the bbox and then include it only if it is finite? Or does the exception occur in get_window_extent? (in which case I'd argue it should be fixed there)
In fact perhaps get_window_extend should return a null bbox (do we even have a way to represent that) in that case, to avoid having to special-case it again and again. Or perhaps not (again, just throwing in some comments).
Sorry, something went wrong.
There was a problem hiding this comment.
Good point.
However, I don't think the API allows returning a None for the window extent, so we'll have to check the dims of the bbox are reasonable w/o an API change
Sorry, something went wrong.
|
There is still something wrong with the logit axis transform that causes _update_label_position to get put at infinity as @Frederik-1 said. Setting the label for logit axis never works which is really the bug. Nonetheless this symptom patch is still probably a good idea. |
Sorry, something went wrong.
|
With master I am not able to reproduce the problem using the test case you provide: (test) ~/work/programs/py/mpl/tests $ python issue11404.py Bbox(x0=-21.6925048828125, y0=58.15555555555555, x1=1155.5, y1=848.3) Do we still need this PR? Or is the original problem fixed by #11417? |
Sorry, something went wrong.
|
We don’t need it to fix the proximate problem anymore but it can’t hurt to check the box has width and height before appending it. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Adresses #11386, #5456. See also #11417 that properly fixes the logit issues...
Code like below caused anything that required the tightbbox of the axes to fail forlogit axes:
This PR does not fix logit axes, but instead ignores non-finite values of the text positions when calculating the bbox, since those are assumed to be invalid. I suppose someone could also figure out how to fix logit, but I'm not too interested in digging into it.
Before
After
PR Checklist