<p dir="auto">If you set the facecolor of a patch with an alpha value, e.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="facecolor=(1,0,0,0.5)"><pre class="notranslate"><code class="notranslate">facecolor=(1,0,0,0.5)
</code></pre></div>
<p dir="auto">the alpha value is ignored; only the patch's <code class="notranslate">_alpha</code> property is used.  This makes it impossible to have a patch with an opaque edge and a (partially) transparent fill.</p>
<p dir="auto">I've only tested this on the TkAgg backend.</p>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>duplicate pick events occurring in 3.4.rc1</strong></p>
<p dir="auto">In MNE-Python, our CIs that test against 3.4.rc1 are failing, because pick events are getting fired twice for every time an artist is picked (this is not happening on 3.3.4). It's happening in a very complicated interactive figure, and I haven't yet managed to work up an MWE that doesn't depend on MNE-Python.  But, I've used <code class="notranslate">git bisect</code> to isolate the first test failure to matplotlib commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/matplotlib/matplotlib/commit/6d79e6eddfe14a10141bab3ce421b2b43bc9a57a/hovercard" href="https://github.com/matplotlib/matplotlib/commit/6d79e6eddfe14a10141bab3ce421b2b43bc9a57a"><tt>6d79e6e</tt></a>.  I will continue trying to further isolate this, but in the meantime if anyone is familiar with MPL changes in the last 4 months, I'd be happy to hear ideas about what might be going on here.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<p dir="auto">This code mirrors what we're doing but is too minimal, in that it doesn't yield doubled pick events:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
from matplotlib.text import Text


def pick_handler(event):
    if isinstance(event.artist, Text):
        print(&quot;PICKED&quot;)


fig, ax = plt.subplots()
_ = ax.plot((0, 1), (0, 1))
for lab in ax.get_yticklabels():
    lab.set_picker(True)

fig.canvas.mpl_connect('pick_event', pick_handler)"><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">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">text</span> <span class="pl-k">import</span> <span class="pl-v">Text</span>


<span class="pl-k">def</span> <span class="pl-en">pick_handler</span>(<span class="pl-s1">event</span>):
    <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">event</span>.<span class="pl-s1">artist</span>, <span class="pl-v">Text</span>):
        <span class="pl-en">print</span>(<span class="pl-s">"PICKED"</span>)


<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>()
<span class="pl-s1">_</span> <span class="pl-c1">=</span> <span class="pl-s1">ax</span>.<span class="pl-en">plot</span>((<span class="pl-c1">0</span>, <span class="pl-c1">1</span>), (<span class="pl-c1">0</span>, <span class="pl-c1">1</span>))
<span class="pl-k">for</span> <span class="pl-s1">lab</span> <span class="pl-c1">in</span> <span class="pl-s1">ax</span>.<span class="pl-en">get_yticklabels</span>():
    <span class="pl-s1">lab</span>.<span class="pl-en">set_picker</span>(<span class="pl-c1">True</span>)

<span class="pl-s1">fig</span>.<span class="pl-s1">canvas</span>.<span class="pl-en">mpl_connect</span>(<span class="pl-s">'pick_event'</span>, <span class="pl-s1">pick_handler</span>)</pre></div>
<p dir="auto">This code reproduces, but with <code class="notranslate">mne</code> dependency:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import matplotlib.pyplot as plt
import mne
# make fake data
data = np.random.standard_normal((2, 100))
info = mne.create_info(['ch1', 'ch2'], 1000)
raw = mne.io.RawArray(data, info)
# plot it
fig = raw.plot()"><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-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">mne</span>
<span class="pl-c"># make fake data</span>
<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">standard_normal</span>((<span class="pl-c1">2</span>, <span class="pl-c1">100</span>))
<span class="pl-s1">info</span> <span class="pl-c1">=</span> <span class="pl-s1">mne</span>.<span class="pl-en">create_info</span>([<span class="pl-s">'ch1'</span>, <span class="pl-s">'ch2'</span>], <span class="pl-c1">1000</span>)
<span class="pl-s1">raw</span> <span class="pl-c1">=</span> <span class="pl-s1">mne</span>.<span class="pl-s1">io</span>.<span class="pl-v">RawArray</span>(<span class="pl-s1">data</span>, <span class="pl-s1">info</span>)
<span class="pl-c"># plot it</span>
<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">raw</span>.<span class="pl-en">plot</span>()</pre></div>
<p dir="auto">In the resulting figure, clicking on one of the yticklabels (the channel names) is supposed to mark the channel as bad (which among other effects, will turn it light grey).  This doesn't happen because the pick event is fired twice, effectively marking and then unmarking the bad channel before a redraw can happen (I have confirmed this by simply inserting a <code class="notranslate">print</code> statement in the pick handler; it prints twice for each click).  There is nothing wrong with the code that marks bad channels; you can do it by clicking on the channel trace itself (which responds to <code class="notranslate">button_press_event</code> instead of <code class="notranslate">pick_event</code>, for complicated reasons).</p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system:</li>
<li>Matplotlib version (<code class="notranslate">import matplotlib; print(matplotlib.__version__)</code>): 3.3.2.post1516+g6d79e6edd</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Qt5Agg</li>
<li>Python version: 3.8.8</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries: mne: current <code class="notranslate">main</code> (0.23.dev0)</li>
</ul>
<p dir="auto">matplotlib installed via <code class="notranslate">pip install -e .</code> from a git clone.</p>