<h3 dir="auto">Bug report</h3>
<p dir="auto">I have the same problem than on this <a href="https://stackoverflow.com/questions/43670867/matplotlib-alpha-transparency-parameter-doesnt-work" rel="nofollow">Stackoverflow webpage</a> :</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
import numpy as np
import matplotlib.pyplot as plt

def main():
	plt.ion()
	rho = np.random.random((4,4))
	xpos = np.arange(0,4,1)
	ypos = np.arange(0,4,1)
	xpos, ypos = np.meshgrid(xpos, ypos)
	xpos = xpos.flatten()
	ypos = ypos.flatten()
	zpos = np.zeros(4*4)
	dx = 0.5 * np.ones_like(zpos)
	dy = dx.copy()
	dz = rho.flatten()
	alpha = 0.5
	fig = plt.figure()
	ax = fig.gca(projection='3d')
	ax.bar3d(xpos,ypos,zpos, dx, dy, dz, alpha=alpha, linewidth=0)
	plt.show()
	input(&quot;Press Enter to continue...&quot;)

if __name__ == '__main__':
	main()
"><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-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</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">def</span> <span class="pl-en">main</span>():
	<span class="pl-s1">plt</span>.<span class="pl-en">ion</span>()
	<span class="pl-s1">rho</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>((<span class="pl-c1">4</span>,<span class="pl-c1">4</span>))
	<span class="pl-s1">xpos</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">4</span>,<span class="pl-c1">1</span>)
	<span class="pl-s1">ypos</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">4</span>,<span class="pl-c1">1</span>)
	<span class="pl-s1">xpos</span>, <span class="pl-s1">ypos</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">meshgrid</span>(<span class="pl-s1">xpos</span>, <span class="pl-s1">ypos</span>)
	<span class="pl-s1">xpos</span> <span class="pl-c1">=</span> <span class="pl-s1">xpos</span>.<span class="pl-en">flatten</span>()
	<span class="pl-s1">ypos</span> <span class="pl-c1">=</span> <span class="pl-s1">ypos</span>.<span class="pl-en">flatten</span>()
	<span class="pl-s1">zpos</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">4</span><span class="pl-c1">*</span><span class="pl-c1">4</span>)
	<span class="pl-s1">dx</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">ones_like</span>(<span class="pl-s1">zpos</span>)
	<span class="pl-s1">dy</span> <span class="pl-c1">=</span> <span class="pl-s1">dx</span>.<span class="pl-en">copy</span>()
	<span class="pl-s1">dz</span> <span class="pl-c1">=</span> <span class="pl-s1">rho</span>.<span class="pl-en">flatten</span>()
	<span class="pl-s1">alpha</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</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">gca</span>(<span class="pl-s1">projection</span><span class="pl-c1">=</span><span class="pl-s">'3d'</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-s1">zpos</span>, <span class="pl-s1">dx</span>, <span class="pl-s1">dy</span>, <span class="pl-s1">dz</span>, <span class="pl-s1">alpha</span><span class="pl-c1">=</span><span class="pl-s1">alpha</span>, <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">0</span>)
	<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()
	<span class="pl-en">input</span>(<span class="pl-s">"Press Enter to continue..."</span>)

<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
	<span class="pl-en">main</span>()</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>

<p dir="auto">The bar on the plot are not transparent at all but they should be.</p>


<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: Ubuntu 16.04</li>
<li>Matplotlib version: 2.0.2</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Qt5Agg</li>
<li>Python version: 3.6</li>
</ul>
<p dir="auto">Matplotlib have been installerd from conda.</p>
<p dir="auto">Trying to create a semitransparent <code class="notranslate">Poly3DCollection</code> fails as shown in the following.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import matplotlib.pyplot as plt

fig = plt.figure()
ax = Axes3D(fig)
x = [0, 1, 1, 0]
y = [0, 0, 1, 1]
z = [0, 1, 0, 1]
verts = [list(zip(x, y, z))]

alpha=0.5
fc = &quot;C0&quot;

# This line fails to give a semitransparent artist
pc = Poly3DCollection(verts, alpha = alpha, facecolors=fc, linewidths=1)

ax.add_collection3d(pc)
plt.show()"><pre class="notranslate"><code class="notranslate">from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import matplotlib.pyplot as plt

fig = plt.figure()
ax = Axes3D(fig)
x = [0, 1, 1, 0]
y = [0, 0, 1, 1]
z = [0, 1, 0, 1]
verts = [list(zip(x, y, z))]

alpha=0.5
fc = "C0"

# This line fails to give a semitransparent artist
pc = Poly3DCollection(verts, alpha = alpha, facecolors=fc, linewidths=1)

ax.add_collection3d(pc)
plt.show()
</code></pre></div>
<p dir="auto">It gives the following output, which still has an alpha of 1.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/23121882/34886224-a4f2e34a-f7c2-11e7-9fee-09f53f6ba235.png"><img src="https://user-images.githubusercontent.com/23121882/34886224-a4f2e34a-f7c2-11e7-9fee-09f53f6ba235.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Non-Working options</h3>
<p dir="auto">Now one may try several things. The following is <strong>not working</strong>:</p>
<ul dir="auto">
<li>
<p dir="auto">Setting facecolor and alpha individually, facecolor first,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  pc = Poly3DCollection(verts, linewidths=1)
  pc.set_facecolor(fc) 
  pc.set_alpha(alpha)"><pre class="notranslate"><code class="notranslate">  pc = Poly3DCollection(verts, linewidths=1)
  pc.set_facecolor(fc) 
  pc.set_alpha(alpha)
</code></pre></div>
</li>
<li>
<p dir="auto">Setting facecolor<strong>s</strong> and alpha at instantiation</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  pc = Poly3DCollection(verts, alpha = alpha, facecolors=fc, linewidths=1)"><pre class="notranslate"><code class="notranslate">  pc = Poly3DCollection(verts, alpha = alpha, facecolors=fc, linewidths=1)
</code></pre></div>
</li>
</ul>
<h3 dir="auto">Working options</h3>
<p dir="auto">However, each of the following is correctly giving a semitransparent artist. This would be the expected outcome for any of the above as well.</p>
<ul dir="auto">
<li>
<p dir="auto">Setting facecolor and alpha individually, alpha first,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  pc = Poly3DCollection(verts, linewidths=1)
  pc.set_alpha(alpha)   # Order reversed 
  pc.set_facecolor(fc)"><pre class="notranslate"><code class="notranslate">  pc = Poly3DCollection(verts, linewidths=1)
  pc.set_alpha(alpha)   # Order reversed 
  pc.set_facecolor(fc)
</code></pre></div>
</li>
<li>
<p dir="auto">Setting alpha at instantiation, facecolor afterwards</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  pc = Poly3DCollection(verts, alpha = alpha, linewidths=1)
  pc.set_facecolor(fc)"><pre class="notranslate"><code class="notranslate">  pc = Poly3DCollection(verts, alpha = alpha, linewidths=1)
  pc.set_facecolor(fc)
</code></pre></div>
</li>
<li>
<p dir="auto">Setting facecolor and alpha at instantiation</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  pc = Poly3DCollection(verts, alpha = alpha, facecolor=fc, linewidths=1)"><pre class="notranslate"><code class="notranslate">  pc = Poly3DCollection(verts, alpha = alpha, facecolor=fc, linewidths=1)
</code></pre></div>
</li>
</ul>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/23121882/34886264-c6730248-f7c2-11e7-9d52-b1bb8455227b.png"><img src="https://user-images.githubusercontent.com/23121882/34886264-c6730248-f7c2-11e7-9d52-b1bb8455227b.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">It seems there had been a similar bug in previous versions, <a href="https://stackoverflow.com/questions/18897786/transparency-for-poly3dcollection-plot-in-matplotlib" rel="nofollow">https://stackoverflow.com/questions/18897786/transparency-for-poly3dcollection-plot-in-matplotlib</a> which was reported to be fixed in the meantime but might have been reintroduced in a newer version.</p>
<p dir="auto">In the 2D case the following works as expected and produces a semtransparent artist.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from matplotlib.collections import PolyCollection
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
x = [0, 1, 1, 0]
y = [0, 0, 1, 1]

verts = [list(zip(x, y))]

alpha=0.5
fc = &quot;C0&quot;

pc = PolyCollection(verts, alpha = alpha, facecolors=fc, linewidths=1)

ax.add_collection(pc)
ax.autoscale()
plt.show()"><pre class="notranslate"><code class="notranslate">from matplotlib.collections import PolyCollection
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
x = [0, 1, 1, 0]
y = [0, 0, 1, 1]

verts = [list(zip(x, y))]

alpha=0.5
fc = "C0"

pc = PolyCollection(verts, alpha = alpha, facecolors=fc, linewidths=1)

ax.add_collection(pc)
ax.autoscale()
plt.show()
</code></pre></div>
<p dir="auto">[All of the code in this issue has been tested with matplotlib 2.1]</p>