@@ -71,7 +71,6 @@ def example_plot(ax, fontsize=12, hide_labels=False):
71
71
ax .set_ylabel ('y-label' , fontsize = fontsize )
72
72
ax .set_title ('Title' , fontsize = fontsize )
73
73
74
-
75
74
fig , ax = plt .subplots (constrained_layout = False )
76
75
example_plot (ax , fontsize = 24 )
77
76
@@ -508,6 +507,7 @@ def docomplicated(suptitle=None):
508
507
example_plot (ax3 )
509
508
example_plot (ax4 )
510
509
fig .suptitle ('subplot2grid' )
510
+ plt .show ()
511
511
512
512
###############################################################################
513
513
# Other Caveats
@@ -588,7 +588,7 @@ def docomplicated(suptitle=None):
588
588
589
589
fig , ax = plt .subplots (constrained_layout = True )
590
590
example_plot (ax , fontsize = 24 )
591
- plot_children (fig , fig . _layoutgrid )
591
+ plot_children (fig )
592
592
593
593
#######################################################################
594
594
# Simple case: two Axes
@@ -603,7 +603,7 @@ def docomplicated(suptitle=None):
603
603
fig , ax = plt .subplots (1 , 2 , constrained_layout = True )
604
604
example_plot (ax [0 ], fontsize = 32 )
605
605
example_plot (ax [1 ], fontsize = 8 )
606
- plot_children (fig , fig . _layoutgrid , printit = False )
606
+ plot_children (fig , printit = False )
607
607
608
608
#######################################################################
609
609
# Two Axes and colorbar
@@ -616,7 +616,7 @@ def docomplicated(suptitle=None):
616
616
im = ax [0 ].pcolormesh (arr , ** pc_kwargs )
617
617
fig .colorbar (im , ax = ax [0 ], shrink = 0.6 )
618
618
im = ax [1 ].pcolormesh (arr , ** pc_kwargs )
619
- plot_children (fig , fig . _layoutgrid )
619
+ plot_children (fig )
620
620
621
621
#######################################################################
622
622
# Colorbar associated with a Gridspec
@@ -629,7 +629,7 @@ def docomplicated(suptitle=None):
629
629
for ax in axs .flat :
630
630
im = ax .pcolormesh (arr , ** pc_kwargs )
631
631
fig .colorbar (im , ax = axs , shrink = 0.6 )
632
- plot_children (fig , fig . _layoutgrid , printit = False )
632
+ plot_children (fig , printit = False )
633
633
634
634
#######################################################################
635
635
# Uneven sized Axes
@@ -654,7 +654,7 @@ def docomplicated(suptitle=None):
654
654
im = ax .pcolormesh (arr , ** pc_kwargs )
655
655
ax = fig .add_subplot (gs [1 , 1 ])
656
656
im = ax .pcolormesh (arr , ** pc_kwargs )
657
- plot_children (fig , fig . _layoutgrid , printit = False )
657
+ plot_children (fig , printit = False )
658
658
659
659
#######################################################################
660
660
# One case that requires finessing is if margins do not have any artists
@@ -669,4 +669,5 @@ def docomplicated(suptitle=None):
669
669
ax01 = fig .add_subplot (gs [0 , 2 :])
670
670
ax10 = fig .add_subplot (gs [1 , 1 :3 ])
671
671
example_plot (ax10 , fontsize = 14 )
672
- plot_children (fig , fig ._layoutgrid )
672
+ plot_children (fig )
673
+ plt .show ()
0 commit comments