Skip to content

Commit cfc8041

Browse files
committed
Merge pull request #3988 from tacaswell/remove_onHilite
MNT : deprecate FigureCanvasBase.onHilite
2 parents 174b126 + 890f2ad commit cfc8041

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

lib/matplotlib/backend_bases.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -1678,12 +1678,6 @@ def __init__(self, figure):
16781678
self.mouse_grabber = None # the axes currently grabbing mouse
16791679
self.toolbar = None # NavigationToolbar2 will set me
16801680
self._is_saving = False
1681-
if False:
1682-
## highlight the artists that are hit
1683-
self.mpl_connect('motion_notify_event', self.onHilite)
1684-
## delete the artists that are clicked on
1685-
#self.mpl_disconnect(self.button_pick_id)
1686-
#self.mpl_connect('button_press_event',self.onRemove)
16871681

16881682
def is_saving(self):
16891683
"""
@@ -1734,15 +1728,16 @@ def onHilite(self, ev):
17341728
17351729
canvas.mpl_connect('motion_notify_event',canvas.onHilite)
17361730
"""
1731+
msg = ("onHilite has been deprecated in 1.5 and will be removed "
1732+
"in 1.6. This function has not been used internally by mpl "
1733+
"since 2007.")
1734+
warnings.warn(msg, mplDeprecation)
17371735
if not hasattr(self, '_active'):
17381736
self._active = dict()
17391737

17401738
under = self.figure.hitlist(ev)
17411739
enter = [a for a in under if a not in self._active]
17421740
leave = [a for a in self._active if a not in under]
1743-
#print "within:"," ".join([str(x) for x in under])
1744-
#print "entering:",[str(a) for a in enter]
1745-
#print "leaving:",[str(a) for a in leave]
17461741
# On leave restore the captured colour
17471742
for a in leave:
17481743
if hasattr(a, 'get_color'):

0 commit comments

Comments
 (0)