File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -1638,22 +1638,19 @@ def _process_layout(layout):
1638
1638
1639
1639
def _do_layout (gs , layout , unique_ids , nested ):
1640
1640
rows , cols = layout .shape
1641
- covered = np .zeros ((rows , cols ), dtype = bool )
1642
1641
output = dict ()
1643
1642
1644
- for j , k in np .argwhere (layout == empty_sentinel ):
1645
- covered [j , k ] = True
1646
-
1647
1643
for name in unique_ids :
1644
+ if name == empty_sentinel :
1645
+ continue
1646
+
1648
1647
indx = np .argwhere (layout == name )
1649
1648
start_row , start_col = np .min (indx , axis = 0 )
1650
1649
end_row , end_col = np .max (indx , axis = 0 ) + 1
1651
1650
slc = (slice (start_row , end_row ), slice (start_col , end_col ))
1652
- if np .any (covered [slc ]):
1651
+
1652
+ if (layout [slc ] != name ).any ():
1653
1653
raise ValueError
1654
- covered [slc ] = True
1655
- if name == empty_sentinel :
1656
- continue
1657
1654
1658
1655
if hasattr (name , 'set_subplotspec' ):
1659
1656
ax = name
You can’t perform that action at this time.
0 commit comments