matplotlib 3.5.1

_default_contains(self, mouseevent, figure=None)
  1. If the artist figure is known and the event did not occur in that figure (by checking its canvas attribute), reject it.

  2. Otherwise, return :None:None:`None, {}`, indicating that the subclass' implementation should be used.

Subclasses should start their definition of contains as follows:

inside, info = self._default_contains(mouseevent) if inside is not None: return inside, info # subclass-specific implementation follows

The figure kwarg is provided for the implementation of :None:None:`.Figure.contains`.

Base impl. for checking whether a mouseevent happened in an artist.

Examples

See :

Local connectivity graph

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


File: /matplotlib/artist.py#452
type: <class 'function'>
Commit: