Skip to content

Commit 77f5b4c

Browse files
committed
flip subfigures axes to match subplots
1 parent 6e23101 commit 77f5b4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/figure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,10 +1582,10 @@ def subfigures(self, nrows=1, ncols=1, squeeze=True,
15821582
height_ratios=height_ratios,
15831583
left=0, right=1, bottom=0, top=1)
15841584

1585-
sfarr = np.empty((nrows, ncols), dtype=object)
1586-
for i in range(ncols):
1587-
for j in range(nrows):
1588-
sfarr[j, i] = self.add_subfigure(gs[j, i], **kwargs)
1585+
sfarr = np.empty((ncols, nrows), dtype=object)
1586+
for i in range(nrows):
1587+
for j in range(ncols):
1588+
sfarr[i, j] = self.add_subfigure(gs[i, j], **kwargs)
15891589

15901590
if self.get_layout_engine() is None and (wspace is not None or
15911591
hspace is not None):

0 commit comments

Comments
 (0)