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 53faed9 commit ac5aa26Copy full SHA for ac5aa26
1 file changed
examples/pyplots/auto_subplots_adjust.py
@@ -28,14 +28,12 @@ def on_draw(event):
28
# want the inverse of that
29
bboxi = bbox.transformed(fig.transFigure.inverted())
30
bboxes.append(bboxi)
31
-
32
- # this is the bbox that bounds all the bboxes, again in relative
33
- # figure coords
34
- bbox = mtransforms.Bbox.union(bboxes)
35
- if fig.subplotpars.left < bbox.width:
36
- # we need to move it over
37
- fig.subplots_adjust(left=1.1*bbox.width) # pad a little
38
- 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()
39
40
fig.canvas.mpl_connect('draw_event', on_draw)
41
0 commit comments