8000 Merge pull request #5712 from tacaswell/fix_rectselector_labels · matplotlib/matplotlib@cfa65a7 · GitHub
[go: up one dir, main page]

Skip to content

Commit cfa65a7

Browse files
committed
Merge pull request #5712 from tacaswell/fix_rectselector_labels
Fix rectselector labels
2 parents 5ccc604 + fef2af6 commit cfa65a7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/matplotlib/widgets.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ def __init__(self, ax, x, y, marker='o', marker_props=None, useblit=True):
15901590
self.ax = ax
15911591

15921592
props = dict(marker=marker, markersize=7, mfc='w', ls='none',
1593-
alpha=0.5, visible=False)
1593+
alpha=0.5, visible=False, label='_nolegend_')
15941594
props.update(marker_props if marker_props is not None else {})
15951595
self._markers = Line2D(x, y, animated=useblit, **props)
15961596
self.ax.add_line(self._markers)
@@ -1788,11 +1788,13 @@ def __init__(self, ax, onselect, drawtype='box',
17881788
self._edge_order = ['W', 'N', 'E', 'S']
17891789
xe, ye = self.edge_centers
17901790
self._edge_handles = ToolHandles(self.ax, xe, ye, marker='s',
1791-
marker_props=props, useblit=self.useblit)
1791+
marker_props=props,
1792+
useblit=self.useblit)
17921793

17931794
xc, yc = self.center
17941795
self._center_handle = ToolHandles(self.ax, [xc], [yc], marker='s',
1795-
marker_props=props, useblit=self.useblit)
1796+
marker_props=props,
1797+
useblit=self.useblit)
17961798

17971799
self.active_handle = None
17981800

0 commit comments

Comments
 (0)
0