Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit de7228a

Browse files
phobsonjklymak
authored andcommitted
FIX: resolve conflict
1 parent 6bf26c6 commit de7228a

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

lib/matplotlib/_constrained_layout.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,8 @@ def arange_subplotspecs(gs, hspace=0, wspace=0):
453453
if child._is_subplotspec_layoutbox():
454454
for child2 in child.children:
455455
# 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)
459458
sschildren += [child]
460459
# now arrange the subplots...
461460
for child0 in sschildren:

lib/matplotlib/_layoutbox.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -358,20 +358,16 @@ def _is_subplotspec_layoutbox(self):
358358
Helper to check if this layoutbox is the layoutbox of a
359359
subplotspec
360360
'''
361-
name = (self.name).split('.')[-1][:-3]
362-
if name == 'ss':
363-
return True
364-
return False
361+
name = (self.name).split('.')[-1]
362+
return name[:2] == 'ss'
365363

366364
def _is_gridspec_layoutbox(self):
367365
'''
368366
Helper to check if this layoutbox is the layoutbox of a
369367
gridspec
370368
'''
371-
name = (self.name).split('.')[-1][:-3]
372-
if name == 'gridspec':
373-
return True
374-
return False
369+
name = (self.name).split('.')[-1]
370+
return name[:8] == 'gridspec'
375371

376372
def find_child_subplots(self):
377373
'''
@@ -650,7 +646,7 @@ def seq_id():
650646

651647
global _layoutboxobjnum
652648

653-
return ('%03d' % (next(_layoutboxobjnum)))
649+
return ('%06d' % (next(_layoutboxobjnum)))
654650

655651

656652
def print_children(lb):

0 commit comments

Comments
 (0)