Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fef2af6

Browse files
committed
FIX: exclude ToolHandles from legend / qteditor
Label the `Line2D` objects used for the tool handles with '_nolegend_' to ensure that they are excluded from the qteditor combo box. closes #5635
1 parent 22140f7 commit fef2af6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/widgets.py

Lines changed: 1 addition & 1 deletion
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)

0 commit comments

Comments
 (0)