<h3 dir="auto">Bug report</h3>
<p dir="auto">Consider the following example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from pylab import *
from matplotlib.backend_bases import MouseEvent
rcdefaults()

fig, axs = plt.subplots(2)
for i, ax in enumerate(axs):
    ax.set(xlim=(0, 1), ylim=(0, 1))
    ann = ax.annotate(
        &quot;hello&quot;, xy=(.4, .4), xytext=(.6, .6), arrowprops={&quot;arrowstyle&quot;: &quot;-&gt;&quot;})
    ax.figure.canvas.draw()
    xs = np.linspace(*ax.get_xlim(), 30)
    ys = np.linspace(*ax.get_ylim(), 30)
    for x in xs:
        for y in ys:
            event = MouseEvent(
                &quot;button_press_event&quot;,
                ax.figure.canvas,
                *ax.transData.transform_point((x, y)))
            art = [ann, ann.arrow_patch][i]
            ax.plot(x, y, &quot;.&quot;, c=&quot;g&quot; if art.contains(event)[0] else &quot;r&quot;)
plt.show()"><pre class="notranslate"><code class="notranslate">from pylab import *
from matplotlib.backend_bases import MouseEvent
rcdefaults()

fig, axs = plt.subplots(2)
for i, ax in enumerate(axs):
    ax.set(xlim=(0, 1), ylim=(0, 1))
    ann = ax.annotate(
        "hello", xy=(.4, .4), xytext=(.6, .6), arrowprops={"arrowstyle": "-&gt;"})
    ax.figure.canvas.draw()
    xs = np.linspace(*ax.get_xlim(), 30)
    ys = np.linspace(*ax.get_ylim(), 30)
    for x in xs:
        for y in ys:
            event = MouseEvent(
                "button_press_event",
                ax.figure.canvas,
                *ax.transData.transform_point((x, y)))
            art = [ann, ann.arrow_patch][i]
            ax.plot(x, y, ".", c="g" if art.contains(event)[0] else "r")
plt.show()
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1322974/37870612-30d637be-2f8f-11e8-8f96-9f73b4ee1fd6.png"><img src="https://user-images.githubusercontent.com/1322974/37870612-30d637be-2f8f-11e8-8f96-9f73b4ee1fd6.png" alt="figure_1" style="max-width: 100%;"></a></p>
<p dir="auto">Points in green mark (a) in the top plot, points that are "contained" (per artist.contains) in the annotation object; (b) in the bottom plot, points that are "contained" in the arrow patch of the annotation object.</p>
<p dir="auto">Obviously neither set of contained points is correct.  This affects, for example, the points that trigger interactive dragging of the annotation.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system:</li>
<li>Matplotlib version: 2.2.1, but also present in 1.5</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): qt5</li>
<li>Python version: 3.6</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries:</li>
</ul>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">The picker of FancyArrowPatch will not work with some arrow styles (see included example). Certain arrow styles will cause the picker to produce a pick event if the user clicks anywhere to the left of the arrow.</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 matplotlib import pyplot as plt
from matplotlib import patches


def pick_event(event):
    print(&quot;PICK&quot;, event.artist)


def main():
    fig = plt.figure()
    axes = fig.add_subplot(111)
    axes.set_xlim((0, 10))
    axes.set_ylim((0, 10))

    arrow = patches.FancyArrowPatch(
        (8, 2),
        (9, 3),
        # Uncommenting this will make the pick event be triggered every time I
        # click to the left of the arrow.
        # arrowstyle='-|&gt;',
    )
    # Same thing happens with arrow.set_picker(True)
    arrow.set_picker(4)

    fig.canvas.mpl_connect('pick_event', pick_event)
    axes.add_patch(arrow)
    plt.show()


if __name__ == '__main__':
    main()
"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</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-k">import</span> <span class="pl-s1">patches</span>


<span class="pl-k">def</span> <span class="pl-en">pick_event</span>(<span class="pl-s1">event</span>):
    <span class="pl-en">print</span>(<span class="pl-s">"PICK"</span>, <span class="pl-s1">event</span>.<span class="pl-s1">artist</span>)


<span class="pl-k">def</span> <span class="pl-en">main</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">axes</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">axes</span>.<span class="pl-en">set_xlim</span>((<span class="pl-c1">0</span>, <span class="pl-c1">10</span>))
    <span class="pl-s1">axes</span>.<span class="pl-en">set_ylim</span>((<span class="pl-c1">0</span>, <span class="pl-c1">10</span>))

    <span class="pl-s1">arrow</span> <span class="pl-c1">=</span> <span class="pl-s1">patches</span>.<span class="pl-v">FancyArrowPatch</span>(
        (<span class="pl-c1">8</span>, <span class="pl-c1">2</span>),
        (<span class="pl-c1">9</span>, <span class="pl-c1">3</span>),
        <span class="pl-c"># Uncommenting this will make the pick event be triggered every time I</span>
        <span class="pl-c"># click to the left of the arrow.</span>
        <span class="pl-c"># arrowstyle='-|&gt;',</span>
    )
    <span class="pl-c"># Same thing happens with arrow.set_picker(True)</span>
    <span class="pl-s1">arrow</span>.<span class="pl-en">set_picker</span>(<span class="pl-c1">4</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_event</span>)
    <span class="pl-s1">axes</span>.<span class="pl-en">add_patch</span>(<span class="pl-s1">arrow</span>)
    <span class="pl-s1">plt</span>.<span class="pl-en">show</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><br>
(With the arrowstyle line uncommented)<br>
A pick event is always triggered when clicking to the left of the arrow.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PICK FancyArrowPatch(8,2-&gt;9,3)
PICK FancyArrowPatch(8,2-&gt;9,3)
PICK FancyArrowPatch(8,2-&gt;9,3)
PICK FancyArrowPatch(8,2-&gt;9,3)
PICK FancyArrowPatch(8,2-&gt;9,3)"><pre class="notranslate"><code class="notranslate">PICK FancyArrowPatch(8,2-&gt;9,3)
PICK FancyArrowPatch(8,2-&gt;9,3)
PICK FancyArrowPatch(8,2-&gt;9,3)
PICK FancyArrowPatch(8,2-&gt;9,3)
PICK FancyArrowPatch(8,2-&gt;9,3)
</code></pre></div>
<p dir="auto"><strong>Expected outcome</strong><br>
The pick event is not triggered unless the user actually clicks on the arrow.</p>
<p dir="auto"><strong>Matplotlib version</strong><br>
I tested this with two versions of matplotlib:</p>
<ul dir="auto">
<li>version 2.0.0 installed via pip 9.0.1 using Python 2.7.12 included in ubuntu</li>
<li>version 1.5.3 built from source using Python 2.7.11 built from source</li>
</ul>
<p dir="auto">OS information:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ uname -a
Linux 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux"><pre class="notranslate">$ uname -a
Linux 4.4.0-62-generic <span class="pl-c"><span class="pl-c">#</span>83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux</span></pre></div>