<h3 dir="auto">Bug report</h3>
<p dir="auto">The <code class="notranslate">direction="column"</code> setting appears to break the <code class="notranslate">label_mode="L"</code> option for <code class="notranslate">AxesGrid</code>.</p>

<p dir="auto"><strong>Code for reproduction</strong></p>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import mpl_toolkits

fig = plt.figure()
grid = mpl_toolkits.axes_grid1.AxesGrid(fig, 111, nrows_ncols=(2,3), 
   axes_pad=.3, direction=&quot;column&quot;, label_mode=&quot;L&quot;)
plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">mpl_toolkits</span>

<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()
<span class="pl-s1">grid</span> <span class="pl-c1">=</span> <span class="pl-s1">mpl_toolkits</span>.<span class="pl-s1">axes_grid1</span>.<span class="pl-v">AxesGrid</span>(<span class="pl-s1">fig</span>, <span class="pl-c1">111</span>, <span class="pl-s1">nrows_ncols</span><span class="pl-c1">=</span>(<span class="pl-c1">2</span>,<span class="pl-c1">3</span>), 
   <span class="pl-s1">axes_pad</span><span class="pl-c1">=</span><span class="pl-c1">.3</span>, <span class="pl-s1">direction</span><span class="pl-c1">=</span><span class="pl-s">"column"</span>, <span class="pl-s1">label_mode</span><span class="pl-c1">=</span><span class="pl-s">"L"</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>

<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3267619/125389727-053f9100-e3e5-11eb-865f-dd7140093dcc.png"><img src="https://user-images.githubusercontent.com/3267619/125389727-053f9100-e3e5-11eb-865f-dd7140093dcc.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3267619/125389873-3cae3d80-e3e5-11eb-9af4-6522189ed7db.png"><img src="https://user-images.githubusercontent.com/3267619/125389873-3cae3d80-e3e5-11eb-9af4-6522189ed7db.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: MacOS 10.15.7</li>
<li>Matplotlib version (<code class="notranslate">import matplotlib; print(matplotlib.__version__)</code>): 3.3.3</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://ipykernel.pylab.backend_inline</li>
<li>Python version: 3.8.6</li>
<li>Jupyter version (if applicable):  6.1.5</li>
<li>Other libraries:</li>
</ul>


<p dir="auto">Installed with conda</p>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Axes of <code class="notranslate">mpl_toolkits.axes_grid1.axes_grid.Grid</code> (and <code class="notranslate">ImageGrid</code>) are not positioned correctly when <code class="notranslate">direction='column'</code>. This affects, e.g., the tick labels (see figures).</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import mpl_toolkits.axes_grid1 as axg1
fig = plt.figure()
g = axg1.Grid(fig, 111, (2, 3), direction='column', axes_pad=0.5)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">mpl_toolkits</span>.<span class="pl-s1">axes_grid1</span> <span class="pl-k">as</span> <span class="pl-s1">axg1</span>
<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()
<span class="pl-s1">g</span> <span class="pl-c1">=</span> <span class="pl-s1">axg1</span>.<span class="pl-v">Grid</span>(<span class="pl-s1">fig</span>, <span class="pl-c1">111</span>, (<span class="pl-c1">2</span>, <span class="pl-c1">3</span>), <span class="pl-s1">direction</span><span class="pl-c1">=</span><span class="pl-s">'column'</span>, <span class="pl-s1">axes_pad</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>)</pre></div>
<p dir="auto"><strong>Actual outcome</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/33603991/120899379-b9543c00-c62f-11eb-89f8-0142d2a375dc.png"><img src="https://user-images.githubusercontent.com/33603991/120899379-b9543c00-c62f-11eb-89f8-0142d2a375dc.png" alt="grid_bug" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/33603991/120899398-d557dd80-c62f-11eb-8f68-b24e39296be9.png"><img src="https://user-images.githubusercontent.com/33603991/120899398-d557dd80-c62f-11eb-8f68-b24e39296be9.png" alt="grid_bug_fix" style="max-width: 100%;"></a></p>
<p dir="auto">Obtained appending</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
g.axes_all = np.reshape(g.axes_all, g.get_geometry()).ravel(order='F')
g._init_locators()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">g</span>.<span class="pl-s1">axes_all</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">reshape</span>(<span class="pl-s1">g</span>.<span class="pl-s1">axes_all</span>, <span class="pl-s1">g</span>.<span class="pl-en">get_geometry</span>()).<span class="pl-en">ravel</span>(<span class="pl-s1">order</span><span class="pl-c1">=</span><span class="pl-s">'F'</span>)
<span class="pl-s1">g</span>.<span class="pl-en">_init_locators</span>()</pre></div>
<p dir="auto">I believe the culprit is<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/matplotlib/matplotlib/blob/89ce4fbdd10694520bd0727f5818e04b75ca96e7/lib/mpl_toolkits/axes_grid1/axes_grid.py#L169">matplotlib/lib/mpl_toolkits/axes_grid1/axes_grid.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 169
      in
      <a data-pjax="true" class="commit-tease-sha" href="/matplotlib/matplotlib/commit/89ce4fbdd10694520bd0727f5818e04b75ca96e7">89ce4fb</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L169" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="169"></td>
          <td id="LC169" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">self</span>.<span class="pl-s1">axes_all</span> <span class="pl-c1">=</span> <span class="pl-s1">axes_array</span>.<span class="pl-en">ravel</span>().<span class="pl-en">tolist</span>() </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">When <code class="notranslate">direction='column'</code>, <code class="notranslate">axes_all</code> are not sorted by creation order; as I think is expected by <code class="notranslate">_init_locators</code> and as likely indicated by the sentence "This also affects the order in which axes are accessed using indexing" in the description of <code class="notranslate">direction</code> in the <code class="notranslate">ImageGrid</code> (but not  <code class="notranslate">Grid</code>) documentation.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: Debian 10 (on WSL2)</li>
<li>Matplotlib version: 3.4.2 (conda-forge)</li>
<li>Matplotlib backend: any</li>
<li>Python version: 3.9.2 (conda-forge)</li>
</ul>