From 00b4074572b9a7fbaa2c25303d0a2a9ce09bbb56 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Fri, 17 Apr 2020 21:13:39 +0100 Subject: [PATCH] Backport PR #17167: Fix misindented block in example. --- examples/pyplots/auto_subplots_adjust.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/pyplots/auto_subplots_adjust.py b/examples/pyplots/auto_subplots_adjust.py index 3fc58e9394e6..90ebb64f0308 100644 --- a/examples/pyplots/auto_subplots_adjust.py +++ b/examples/pyplots/auto_subplots_adjust.py @@ -28,14 +28,12 @@ def on_draw(event): # want the inverse of that bboxi = bbox.inverse_transformed(fig.transFigure) bboxes.append(bboxi) - - # this is the bbox that bounds all the bboxes, again in relative - # figure coords - bbox = mtransforms.Bbox.union(bboxes) - if fig.subplotpars.left < bbox.width: - # we need to move it over - fig.subplots_adjust(left=1.1*bbox.width) # pad a little - fig.canvas.draw() + # the bbox that bounds all the bboxes, again in relative figure coords + bbox = mtransforms.Bbox.union(bboxes) + if fig.subplotpars.left < bbox.width: + # we need to move it over + fig.subplots_adjust(left=1.1*bbox.width) # pad a little + fig.canvas.draw() fig.canvas.mpl_connect('draw_event', on_draw)