8000 FIX: ignore non-finite bbox · matplotlib/matplotlib@b8ba0c0 · GitHub
[go: up one dir, main page]

Skip to content

Commit b8ba0c0

Browse files
committed
FIX: ignore non-finite bbox
1 parent e4ba4f2 commit b8ba0c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4259,7 +4259,9 @@ def get_tightbbox(self, renderer, call_axes_locator=True,
42594259

42604260
for a in bbox_artists:
42614261
bbox = a.get_tightbbox(renderer)
4262-
if bbox is not None and (bbox.width != 0 or bbox.height != 0):
4262+
if (bbox is not None and
4263+
(bbox.width != 0 or bbox.height != 0) and
4264+
np.isfinite(bbox.width) and np.isfinite(bbox.height)):
42634265
bb.append(bbox)
42644266

42654267
_bbox = mtransforms.Bbox.union(

0 commit comments

Comments
 (0)
0