diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 2fd9286b75da..129dee3e88b9 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -1610,6 +1610,9 @@ def get_tightbbox(self, renderer): if ax.get_visible(): bb.append(ax.get_tightbbox(renderer)) + if len(bb) == 0: + return self.bbox_inches + _bbox = Bbox.union([b for b in bb if b.width != 0 or b.height != 0]) bbox_inches = TransformedBbox(_bbox,