<h3 dir="auto">Bug summary</h3>
<p dir="auto">If <code class="notranslate">set_xscale("log")</code> is set for an <code class="notranslate">inset_axes</code> instance, the default tick formatter is applied irrespective of any calls to <code class="notranslate">set_xticklabels()</code> (before or after the scaling). The same is true for the y-axis.</p>
<h3 dir="auto">Code for reproduction</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fig, axes = plt.subplots(1, 2)
for ax_main in axes:
    ax_in = ax_main.inset_axes([0.05, 0.5, 0.25, 0.5])
    ax_main.plot((1,2))
    ax_in.plot((1,2))
    ax_in.set_xticklabels(())
    ax_in.set_yticklabels(())

ax_in.set_xscale(&quot;log&quot;)

plt.show()"><pre class="notranslate"><span class="pl-s1">fig</span>, <span class="pl-s1">axes</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-c1">1</span>, <span class="pl-c1">2</span>)
<span class="pl-k">for</span> <span class="pl-s1">ax_main</span> <span class="pl-c1">in</span> <span class="pl-s1">axes</span>:
    <span class="pl-s1">ax_in</span> <span class="pl-c1">=</span> <span class="pl-s1">ax_main</span>.<span class="pl-en">inset_axes</span>([<span class="pl-c1">0.05</span>, <span class="pl-c1">0.5</span>, <span class="pl-c1">0.25</span>, <span class="pl-c1">0.5</span>])
    <span class="pl-s1">ax_main</span>.<span class="pl-en">plot</span>((<span class="pl-c1">1</span>,<span class="pl-c1">2</span>))
    <span class="pl-s1">ax_in</span>.<span class="pl-en">plot</span>((<span class="pl-c1">1</span>,<span class="pl-c1">2</span>))
    <span class="pl-s1">ax_in</span>.<span class="pl-en">set_xticklabels</span>(())
    <span class="pl-s1">ax_in</span>.<span class="pl-en">set_yticklabels</span>(())

<span class="pl-s1">ax_in</span>.<span class="pl-en">set_xscale</span>(<span class="pl-s">"log"</span>)

<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<h3 dir="auto">Actual outcome</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24915701/204782410-7088f3dd-1a2e-4181-b17f-e40073becd6d.png"><img src="https://user-images.githubusercontent.com/24915701/204782410-7088f3dd-1a2e-4181-b17f-e40073becd6d.png" alt="Figure_1" style="max-width: 100%;"></a></p>
<h3 dir="auto">Expected outcome</h3>
<p dir="auto">The left and right axes of the above should have identical tick labels (i.e. none).</p>
<h3 dir="auto">Additional information</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Operating system</h3>
<p dir="auto">Ubuntu</p>
<h3 dir="auto">Matplotlib Version</h3>
<p dir="auto">3.4.3</p>
<h3 dir="auto">Matplotlib Backend</h3>
<p dir="auto">Qt5Agg, module://matplotlib_inline.backend_inline</p>
<h3 dir="auto">Python version</h3>
<p dir="auto">Python 3.9.9</p>
<h3 dir="auto">Jupyter version</h3>
<p dir="auto">6.4.5</p>
<h3 dir="auto">Installation</h3>
<p dir="auto">conda</p>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Units (e.g. datetime) and scales (e.g. log) both come with their own default locators (various DateLocators, LogLocator) and formatters (various DateFormatters, LogFormatter), which are being set in <code class="notranslate">Axis._update_axisinfo</code> and <code class="notranslate">Axis.set_scale</code>, respectively.</p>
<p dir="auto">If a locator or formatter has <em>already</em> been manually set on the axis, then setting units will <em>not</em> override the user-set locator/formatter -- this is tracked using the slighly awkwardly named <code class="notranslate">isDefault_{maj,min}{loc,fmt}</code>.  On the other hand, setting a scale <em>will</em> override locator/formatters previously set.</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="from pylab import *

subplot(121)
xticks([])
xscale(&quot;log&quot;)

subplot(122)
xticks([])
plot_date([1, 2], [3, 4])

show()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">pylab</span> <span class="pl-k">import</span> <span class="pl-c1">*</span>

<span class="pl-en">subplot</span>(<span class="pl-c1">121</span>)
<span class="pl-en">xticks</span>([])
<span class="pl-en">xscale</span>(<span class="pl-s">"log"</span>)

<span class="pl-en">subplot</span>(<span class="pl-c1">122</span>)
<span class="pl-en">xticks</span>([])
<span class="pl-en">plot_date</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>], [<span class="pl-c1">3</span>, <span class="pl-c1">4</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/1322974/94248230-7b3e3e80-ff1e-11ea-820c-762b0e208e22.png"><img src="https://user-images.githubusercontent.com/1322974/94248230-7b3e3e80-ff1e-11ea-820c-762b0e208e22.png" alt="test" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">Consistent behavior between the two cases.  <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="708644922" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/18571" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/18571/hovercard?comment_id=698809202&amp;comment_type=issue_comment" href="https://github.com/matplotlib/matplotlib/issues/18571#issuecomment-698809202">#18571 (comment)</a> is one where scales also respecting user-set locators/formatters would be nice, but I can also see an argument for the opposite behavior for simplicity...</p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: linux</li>
<li>Matplotlib version: HEAD</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): any</li>
<li>Python version: 38</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries:</li>
</ul>