get_cursor_data(self, event)
This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself.
Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns None.
Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that .format_cursor_data
can convert the data to a string representation.
The only current use case is displaying the z-value of an .AxesImage
in the status bar of a plot window, while moving the mouse.
Return the cursor data for a given event.
The following pages refer to to this document either explicitly or contain code examples using this.
matplotlib.artist.Artist.format_cursor_data
matplotlib.image.AxesImage.get_cursor_data
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them