@@ -98,7 +98,8 @@ def __init__(self, fig,
9898 If not None, only the first *ngrids* axes in the grid are created.
9999 direction : {"row", "column"}, default: "row"
100100 Whether axes are created in row-major ("row by row") or
101- column-major order ("column by column").
101+ column-major order ("column by column"). This also affects the
102+ order in which axes are accessed using indexing (``grid[index]``).
102103 axes_pad : float or (float, float), default: 0.02
103104 Padding or (horizontal padding, vertical padding) between axes, in
104105 inches.
@@ -166,7 +167,8 @@ def __init__(self, fig,
166167 sharey = axes_array [row , 0 ] if share_y else None
167168 axes_array [row , col ] = axes_class (
168169 fig , rect , sharex = sharex , sharey = sharey )
169- self .axes_all = axes_array .ravel ().tolist ()
170+ self .axes_all = axes_array .ravel (
171+ order = "C" if self ._direction == "row" else "F" ).tolist ()
170172 self .axes_column = axes_array .T .tolist ()
171173 self .axes_row = axes_array .tolist ()
172174 self .axes_llc = self .axes_column [0 ][- 1 ]
0 commit comments