<p dir="auto">Sorry if this is a duplicate, but I didn't find anything...</p>
<p dir="auto">Why does:<br>
<code class="notranslate">ax.xaxis.set_ticks_position('right')</code> set<code class="notranslate">horizontalignment = 'left'</code> for the tick labels?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fig,ax=plt.subplots()
ax.plot(np.arange(-10,10))
ax.yaxis.set_ticks_position('right')"><pre class="notranslate"><code class="notranslate">fig,ax=plt.subplots()
ax.plot(np.arange(-10,10))
ax.yaxis.set_ticks_position('right')
</code></pre></div>
<p dir="auto">I'm not clear on why the ticks should change their horizontal alignment based on what side of the axis they are displayed on.  I can <em>imagine</em> a technical difficulty in guessing how large the label is before it is drawn.  Is this a layout manager issue?</p>
<p dir="auto">Most importantly for me, it makes colorbars look poor if they have negative values, and require a manual twiddle to make look good.</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 matplotlib.axes as maxes

fig = plt.figure()
ax = maxes.Axes(fig, [0.1, 0.1, 0.9, 0.9])
print(fig.get_children())"><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">matplotlib</span>.<span class="pl-s1">axes</span> <span class="pl-k">as</span> <span class="pl-s1">maxes</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">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">maxes</span>.<span class="pl-v">Axes</span>(<span class="pl-s1">fig</span>, [<span class="pl-c1">0.1</span>, <span class="pl-c1">0.1</span>, <span class="pl-c1">0.9</span>, <span class="pl-c1">0.9</span>])
<span class="pl-en">print</span>(<span class="pl-s1">fig</span>.<span class="pl-en">get_children</span>())</pre></div>
<p dir="auto">returns a list with no axes....</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[&lt;matplotlib.patches.Rectangle object at 0x7f8d75707dc0&gt;]"><pre class="notranslate"><code class="notranslate">[&lt;matplotlib.patches.Rectangle object at 0x7f8d75707dc0&gt;]
</code></pre></div>
<p dir="auto">For 3-d</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 matplotlib.axes as maxes
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = Axes3D(fig)
print(fig.get_children())"><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">matplotlib</span>.<span class="pl-s1">axes</span> <span class="pl-k">as</span> <span class="pl-s1">maxes</span>
<span class="pl-k">from</span> <span class="pl-s1">mpl_toolkits</span>.<span class="pl-s1">mplot3d</span> <span class="pl-k">import</span> <span class="pl-v">Axes3D</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">ax</span> <span class="pl-c1">=</span> <span class="pl-v">Axes3D</span>(<span class="pl-s1">fig</span>)
<span class="pl-en">print</span>(<span class="pl-s1">fig</span>.<span class="pl-en">get_children</span>())</pre></div>
<p dir="auto">has the axes attached:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[&lt;matplotlib.patches.Rectangle object at 0x7fbc2968d160&gt;, &lt;mpl_toolkits.mplot3d.axes3d.Axes3D object at 0x7fbc2968df40&gt;]"><pre class="notranslate"><code class="notranslate">[&lt;matplotlib.patches.Rectangle object at 0x7fbc2968d160&gt;, &lt;mpl_toolkits.mplot3d.axes3d.Axes3D object at 0x7fbc2968df40&gt;]
</code></pre></div>
<p dir="auto"><code class="notranslate">Axes3D.__init__</code> explicitly adds itself to its parent:</p>
<p dir="auto"></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/c035f66d657b9211bc7f986c24c430e9e7314a6c/lib/mpl_toolkits/mplot3d/axes3d.py#L139">matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 139
      in
      <a data-pjax="true" class="commit-tease-sha" href="/matplotlib/matplotlib/commit/c035f66d657b9211bc7f986c24c430e9e7314a6c">c035f66</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="L139" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="139"></td>
          <td id="LC139" 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">figure</span>.<span class="pl-en">add_axes</span>(<span class="pl-s1">self</span>) </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">whereas no such thing happens for the base <code class="notranslate">Axes</code> class.</p>
<p dir="auto">Discovered as part of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="685869676" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/18356" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/18356/hovercard" href="https://github.com/matplotlib/matplotlib/pull/18356">#18356</a>, but discussing here because its orthogonal.  But I think the behaviour here should be the same .</p>