Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f256b79 + aa5537a commit 4d7f8ceCopy full SHA for 4d7f8ce
1 file changed
lib/matplotlib/axis.py
@@ -1151,8 +1151,10 @@ def get_tightbbox(self, renderer):
1151
bb = []
1152
1153
for a in [self.label, self.offsetText]:
1154
- if a.get_visible():
1155
- bb.append(a.get_window_extent(renderer))
+ bbox = a.get_window_extent(renderer)
+ if (np.isfinite(bbox.width) and np.isfinite(bbox.height) and
1156
+ a.get_visible()):
1157
+ bb.append(bbox)
1158
1159
bb.extend(ticklabelBoxes)
1160
bb.extend(ticklabelBoxes2)
0 commit comments