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.
1 parent 9d81809 commit aa5537aCopy full SHA for aa5537a
1 file changed
lib/matplotlib/axis.py
@@ -1145,8 +1145,10 @@ def get_tightbbox(self, renderer):
1145
bb = []
1146
1147
for a in [self.label, self.offsetText]:
1148
- if a.get_visible():
1149
- bb.append(a.get_window_extent(renderer))
+ bbox = a.get_window_extent(renderer)
+ if (np.isfinite(bbox.width) and np.isfinite(bbox.height) and
1150
+ a.get_visible()):
1151
+ bb.append(bbox)
1152
1153
bb.extend(ticklabelBoxes)
1154
bb.extend(ticklabelBoxes2)
0 commit comments