From 9af9b5b0df1ba9406ddf07b42f8b19e747ec40db Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Sun, 5 Jan 2020 11:16:22 +0100 Subject: [PATCH] In DraggableLegend, inherit DraggableBase.artist_picker. ... which is implemented to return self.ref_artist.contains(evt), and DraggableLegend.ref_artist == self.legend, so all's good. Can be checked by manually dragging a draggable legend: ``` plot([1, 2], label="foo"); legend().set_draggable(True) ``` --- lib/matplotlib/legend.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py index 500a174ec0d1..02782ca9408f 100644 --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -70,9 +70,6 @@ def __init__(self, legend, use_blit=False, update="loc"): DraggableOffsetBox.__init__(self, legend, legend._legend_box, use_blit=use_blit) - def artist_picker(self, legend, evt): - return self.legend.contains(evt) - def finalize_offset(self): update_method = cbook._check_getitem( {"loc": self._update_loc, "bbox": self._bbox_to_anchor},