@@ -272,7 +272,7 @@ def do_constrained_layout(fig, renderer, h_pad, w_pad,
272
272
# This routine makes all the subplot spec containers
273
273
# have the correct arrangement. It just stacks the
274
274
# subplot layoutboxes in the correct order...
275
- arange_subplotspecs (child , hspace = hspace , wspace = wspace )
275
+ _arange_subplotspecs (child , hspace = hspace , wspace = wspace )
276
276
277
277
# - Align right/left and bottom/top spines of appropriate subplots.
278
278
# - Compare size of subplotspec including height and width ratios
@@ -443,7 +443,7 @@ def do_constrained_layout(fig, renderer, h_pad, w_pad,
443
443
ax ._set_position (newpos , which = 'original' )
444
444
445
445
446
- def arange_subplotspecs (gs , hspace = 0 , wspace = 0 ):
446
+ def _arange_subplotspecs (gs , hspace = 0 , wspace = 0 ):
447
447
"""
448
448
arange the subplotspec children of this gridspec, and then recursively
449
449
do the same of any gridspec children of those gridspecs...
@@ -453,9 +453,8 @@ def arange_subplotspecs(gs, hspace=0, wspace=0):
453
453
if child ._is_subplotspec_layoutbox ():
454
454
for child2 in child .children :
455
455
# check for gridspec children...
456
- name = (child2 .name ).split ('.' )[- 1 ][:- 3 ]
457
- if name == 'gridspec' :
458
- arange_subplotspecs (child2 , hspace = hspace , wspace = wspace )
456
+ if child2 ._is_gridspec_layoutbox ():
457
+ _arrange_subplotspecs (child2 , hspace = hspace , wspace = wspace )
459
458
sschildren += [child ]
460
459
# now arrange the subplots...
461
460
for child0 in sschildren :
0 commit comments