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

Skip to content

Commit 73e1f59

Browse files
committed
adding hover_event stub
1 parent 6ab710d commit 73e1f59

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/matplotlib/backends/_backend_tk.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,17 @@ def leave_notify_event(self, event):
311311
modifiers=self._mpl_modifiers(event),
312312
guiEvent=event)._process()
313313

314+
def hover_event(self, event):
315+
artist = event.artist
316+
if not artist.get_hover:
317+
thismouse = MouseEvent("motion_hover_event", self,
318+
*self.mouseEventCoords(event),
319+
modifiers=self._mpl_modifiers(),
320+
guiEvent=event)
321+
HoverEvent("motion_hover_event", self,
322+
thismouse, artist, None)._process()
323+
# make tooltip corresponding to this? this part doesn't exactly work
324+
314325
def button_press_event(self, event, dblclick=False):
315326
# set focus to the canvas so that it can receive keyboard events
316327
self._tkcanvas.focus_set()

0 commit comments

Comments
 (0)