[Matplotlib-users] confused with name of certain events
Jose Borreguero
borreguero at gmail.com
Tue Nov 7 17:19:02 EST 2017
Dear Matplotlib gurus,
The following example prints the event.name
for two events:
'figure_enter_event' and 'axes_enter_event':
from __future__ import print_function
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
fig.canvas.mpl_connect('figure_enter_event',
lambda event: print(f'enter figure: {event.name}'))
fig.canvas.mpl_connect('axes_enter_event',
lambda event: print(f'enter axes: {event.name}'))
plt.show()
This is what I get
when
hovering the mouse
over the canvas:
enter figure: figure_enter_event
enter axes: motion_notify_event
enter figure: figure_enter_event
enter axes: motion_notify_event
What is the reason for 'motion_notify_event' being the assigned name to
axes_enter_event but not figure_enter_event
?
Best,
.Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20171107/814ec6ed/attachment.html>
More information about the Matplotlib-users
mailing list