MPL Event Handling Doc Example not fully functioning
See original GitHub issueI tried the example from the MPL event handling docs: a bar chart with draggable bars (“extra credit” version). This works fine in QT5Agg
backend, but doesn’t fully work in Jupyter Lab (v3.0.7) with ipympl (v0.7.0). The plot displays fine, and I can see that click and drag events are being received by the widget, but during drag, the bars vanish. In fact, if in the click handler I include a color change:
self.rect.set(animated=True,color='red')
Then I can see a faint red outline after the bar is “dropped” in the correct location (see below). So clearly the click/drag/release events are working, but the bar drawing during and after drag via draw_artist
and blit
are not.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Event handling and picking — Matplotlib 3.6.2 documentation
Event handling and picking#. Matplotlib works with a number of user interface toolkits (wxpython, tkinter, qt, gtk, and macosx) and in order to...
Read more >Event handling and picking — Matplotlib 1.3.1 documentation
if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event. The signature...
Read more >How to regain control using mpl_disconnect() to end custom ...
I cannot get mpl_disconnect() to work in any situation I've tried. For illustration, I have this example from the Matplotlib documentation on event...
Read more >mpl-events - PyPI
mpl -events provides high-level API, auto disconnecting and cleanup · Strings-based event types/names are not used. · Integer connection ...
Read more >Event Handling Functions - Language Basics - MQL4 Reference
If other parameters, not corresponding to below descriptions, are specified for a corresponding function, or another return type is indicated for it, such...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think what you’re running into now is this issue from core matplotlib: https://github.com/matplotlib/matplotlib/issues/19116
Unfortunately no one has figured out a solution yet, your thoughts are of course welcome!
Another bit of debugging. If I artificially limit movements to be relatively quite large (dropping all motion events that are “too small”), and move slowly it works just fine: