Open stepsbystep opened 1 year ago
Btw, I also tried the following cursor definition:
cursor = mplcursors.cursor(ax.artists, hover=2) #mplcursors.HoverMode.Transient)
which also resulted in no errors, but no cursor function.
Thanks for the report. Looks like some work is needed to make that work, which I can't do right now but I'll keep it on my todo. A minimal reproduction example would be appreciated, though.
I'm trying to add hover captions to images added to a plot with AnnotationBbox. I haven't been able to make it work or find anything about how to do it online. With the following code snippet I get the error that follows after it.
(This is just the last few lines.)
When I only include the AnnotationBbox object in the cursor definition, I get no errors, but I get no hovering cursor text either.
If AnnotationBbox doesn't work with mplcursors, is there some other way to add an image that does?
Mplcursors is great, by the way! I have a lot of uses in mind. If I can get this straightened out, I will be taking up mplcursors functionality with streamlit. They have a great pyplot component, but it doesn't do mplcursors or other hover text yet.