<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Bar chart with Axes3d does not correctly set the log z scale. There is a note in the doc: <a href="https://matplotlib.org/mpl_toolkits/mplot3d/api.html#mpl_toolkits.mplot3d.axes3d.Axes3D.set_zscale" rel="nofollow">here</a> saying this was added in 1.1.0. (And also asks to report bugs :-) )</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 mpl_toolkits.mplot3d import Axes3D  # noqa: F401 unused import
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

# dumb dump of data
dx, dy = 0.5, 0.5
xpos = [0.25, 0.25, 0.25, 0.25, 
        1.25, 1.25, 1.25, 1.25, 
        2.25, 2.25, 2.25, 2.25]
ypos = [0.25, 1.25, 2.25, 3.25, 
        0.25, 1.25, 2.25, 3.25,
        0.25, 1.25, 2.25, 3.25]
dz = [1.,  0.517e6,  4.7e6,  2.2e6,  
      1.,  105e6,  96e6,  1.28e9, 
      1.,   1.776e9 ,  4.18e9 ,173.1e9]

ax.set_zlabel(&quot;mass [eV]&quot;)
ax.set_ylabel(&quot;type&quot;)
ax.set_xlabel(&quot;generation&quot;)
ax.set_xticklabels([&quot;&quot;, &quot;1&quot;, &quot;&quot;, &quot;2&quot;, &quot;&quot;, &quot;3&quot;])
ax.set_yticklabels([&quot;&quot;, r&quot;$\nu$&quot;, &quot;&quot;, r&quot;$\ell$&quot;, &quot;&quot;, &quot;d&quot;, &quot;&quot;, &quot;u&quot;])
ax.set_zscale('log')
ax.bar3d(xpos, ypos, 0, dx, dy, dz)

plt.tight_layout()
plt.savefig('Desktop/brokenlog.png')
plt.show()

"><pre class="notranslate"><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-c"># noqa: F401 unused import</span>
<span class="pl-c1">%</span><span class="pl-s1">matplotlib</span> <span class="pl-s1">inline</span>
<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">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</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">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">111</span>, <span class="pl-s1">projection</span><span class="pl-c1">=</span><span class="pl-s">'3d'</span>)

<span class="pl-c"># dumb dump of data</span>
<span class="pl-s1">dx</span>, <span class="pl-s1">dy</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span>, <span class="pl-c1">0.5</span>
<span class="pl-s1">xpos</span> <span class="pl-c1">=</span> [<span class="pl-c1">0.25</span>, <span class="pl-c1">0.25</span>, <span class="pl-c1">0.25</span>, <span class="pl-c1">0.25</span>, 
        <span class="pl-c1">1.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">1.25</span>, 
        <span class="pl-c1">2.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">2.25</span>]
<span class="pl-s1">ypos</span> <span class="pl-c1">=</span> [<span class="pl-c1">0.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">3.25</span>, 
        <span class="pl-c1">0.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">3.25</span>,
        <span class="pl-c1">0.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">3.25</span>]
<span class="pl-s1">dz</span> <span class="pl-c1">=</span> [<span class="pl-c1">1.</span>,  <span class="pl-c1">0.517e6</span>,  <span class="pl-c1">4.7e6</span>,  <span class="pl-c1">2.2e6</span>,  
      <span class="pl-c1">1.</span>,  <span class="pl-c1">105e6</span>,  <span class="pl-c1">96e6</span>,  <span class="pl-c1">1.28e9</span>, 
      <span class="pl-c1">1.</span>,   <span class="pl-c1">1.776e9</span> ,  <span class="pl-c1">4.18e9</span> ,<span class="pl-c1">173.1e9</span>]

<span class="pl-s1">ax</span>.<span class="pl-en">set_zlabel</span>(<span class="pl-s">"mass [eV]"</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">set_ylabel</span>(<span class="pl-s">"type"</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">set_xlabel</span>(<span class="pl-s">"generation"</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">set_xticklabels</span>([<span class="pl-s">""</span>, <span class="pl-s">"1"</span>, <span class="pl-s">""</span>, <span class="pl-s">"2"</span>, <span class="pl-s">""</span>, <span class="pl-s">"3"</span>])
<span class="pl-s1">ax</span>.<span class="pl-en">set_yticklabels</span>([<span class="pl-s">""</span>, <span class="pl-s">r"$\nu$"</span>, <span class="pl-s">""</span>, <span class="pl-s">r"$\ell$"</span>, <span class="pl-s">""</span>, <span class="pl-s">"d"</span>, <span class="pl-s">""</span>, <span class="pl-s">"u"</span>])
<span class="pl-s1">ax</span>.<span class="pl-en">set_zscale</span>(<span class="pl-s">'log'</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">bar3d</span>(<span class="pl-s1">xpos</span>, <span class="pl-s1">ypos</span>, <span class="pl-c1">0</span>, <span class="pl-s1">dx</span>, <span class="pl-s1">dy</span>, <span class="pl-s1">dz</span>)

<span class="pl-s1">plt</span>.<span class="pl-en">tight_layout</span>()
<span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'Desktop/brokenlog.png'</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()
</pre></div>
<p dir="auto"><strong>Actual outcome</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1836192/64704733-0b921880-d4af-11e9-9321-279cd99bc96a.png"><img src="https://user-images.githubusercontent.com/1836192/64704733-0b921880-d4af-11e9-9321-279cd99bc96a.png" alt="brokenlog" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">Log scale on z axis w/ ticks at orders of magnitude.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>
<p dir="auto">Operating system: ubuntu 18.04 LTS</p>
</li>
<li>
<p dir="auto">Matplotlib version: 3.1.1</p>
</li>
<li>
<p dir="auto">Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://ipykernel.pylab.backend_inline</p>
</li>
<li>
<p dir="auto">Python version: 3.6.8</p>
</li>
<li>
<p dir="auto">Jupyter version (if applicable): 4.4.0</p>
</li>
</ul>
<p dir="auto">matplotlib installed/updated via <code class="notranslate">pip3</code>.</p>
<p dir="auto"><a href="https://sourceforge.net/tracker/?func=detail&amp;aid=3314771&amp;group_id=80706&amp;atid=560720" rel="nofollow">Original report at SourceForge, opened Fri Jun 10 12:29:24 2011</a></p>
<p dir="auto">If you enable a log scale when doing a 3D scatter plot, nothing is created and the program crashes. Attached is the error output.</p>
<p dir="auto">You can easily reproduce this by taking the example scatter3d_demo.py and adding the line "ax.set_xscale('log')".</p>
<h3 dir="auto">SourceForge History</h3>
<ul dir="auto">
<li>On Fri Jun 10 12:29:40 2011, by qulogic: File Added: 414517: mpl-3d-log-error.txt</li>
</ul>