You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MultiCursor should be able to bind to axes in more than one figure... #23339
Multicursor only works if all the axes are in the same figure...
Each tab is its own Figure/Canvas. MultiCursor only binds itself to one Canvas so it only sees mouse events from axes on in the figure that canvas is associated with.
The fix here is to add a check that all Axes are in the same Figure on init and raise otherwise.
While I haven't looked at the details, it should be possible (and hopefully easy) for MultiCursor to just loop over all canvases of all artists (both when connecting the callbacks, and in the callbacks implementations). mplcursors does something similar, e.g. registration over all canvases is at https://github.com/anntzer/mplcursors/blob/main/lib/mplcursors/_mplcursors.py#L256-L259.
Activity
tacaswell commentedon Jun 24, 2022
This is complicated by #21496 .