Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug summary
Somehow onCentOS Linux 7
keyboard-buttons are not forwarded withpick_events
... onWindows 10
everything works as expected.
Code for reproduction
importmatplotlib.pyplotaspltf,ax=plt.subplots()s=ax.scatter([1,2,3,4], [1,2,3,4],s=1000)s.set_picker(True)defdoit(event):ifevent.name=="button_press_event":print(event.name,event.key)ifevent.name=="pick_event":print(event.name,event.mouseevent.key)f.canvas.mpl_connect("button_press_event",doit)f.canvas.mpl_connect("pick_event",doit)
Actual outcome
When clicking on one of the datapoints while pressing the buttons1
2
and3
the following happens:
on Windows I get:
pick_event1button_press_event1pick_event2button_press_event2pick_event3button_press_event3
on CentOS Linux I get:
pick_eventNonebutton_press_event1pick_eventNonebutton_press_event2pick_eventNonebutton_press_event3
Expected outcome
The same output for both OS
Operating system
Windows / Linux CentOS7
Matplotlib Version
3.6.1
Matplotlib Backend
Qt5Agg
Python version
3.9.13
Installation
conda