mplcursors icon indicating copy to clipboard operation
mplcursors copied to clipboard

Cursors on multiple axes affected by movement

Open ascended121 opened this issue 2 years ago • 1 comments

I have a figure which includes more than one axis and I'm able to add cursors:

fig, ax = plt.subplots(nrows=3, ncols=1)
...
for axis in ax:
        mplcursors.cursor(axis, multiple=True)

however when I shift-left/shift-right, with the intent of moving the most recent cursor, all of them move, making it impossible to adjust any single cursor.

When I add multiple cursors to each axis, only the most recent cursor added to each axis moves.

Is there a way to select a particular cursor to target with these movement commands?

ascended121 avatar Jan 09 '24 19:01 ascended121

No (well, you probably can manually set the .enabled attribute to False on whatever cursor you want to disable, but that won't let you select an older sub-cursor). There is some discussion for a more complete "active cursor" API/management system in #34, but it went nowhere for now.

anntzer avatar Jan 10 '24 08:01 anntzer

Closing this -- let's continue the discussion on #34, which I think covers this case as well.

anntzer avatar Apr 26 '24 22:04 anntzer