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
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.
--> 259 for canvas in {artist.figure.canvas for artist in artists}]
261 bindings = {**_default_bindings,
262 **(bindings if bindings is not None else {})}
263 unknown_bindings = {*bindings} - {*_default_bindings}
AttributeError: 'ArtistList' object has no attribute 'figure'`
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: