lib/matplotlib/text.py
def contains(self,mouseevent):
        """Test whether the mouse event occurred in the patch.

        In the case of text, a hit is true anywhere in the
        axis-aligned bounding-box containing the text.

        Returns True or False.
        """
        if callable(self._contains): return self._contains(self,mouseevent)

        if not self.get_visible() or self._renderer is None:
            return False,{}

        l,b,w,h = self.get_window_extent().bounds

        r = l+w
        t = b+h
        xyverts = (l,b), (l, t), (r, t), (r, b)
        x, y = mouseevent.x, mouseevent.y
        inside = nxutils.pnpoly(x, y, xyverts)

        return inside,{}
Test whether the mouse event occurred in the patch.

        In the case of text, a hit is true anywhere in the
        axis-aligned bounding-box containing the text.

        Returns True or False.
        
Test whether the mouse event occurred in the patch.
In the case of text, a hit is true anywhere in the
axis-aligned bounding-box containing the text.

Returns True or False.
Test whether the mouse event occurred in the patch . In the case of text a hit is true anywhere in the axis - aligned bounding - box containing the text . Returns True or False .
def contains(self,mouseevent):
        if callable(self._contains): return self._contains(self,mouseevent)
        if not self.get_visible() or self._renderer is None:
            return False,{}
        l,b,w,h = self.get_window_extent().bounds
        r = l+w
        t = b+h
        xyverts = (l,b), (l, t), (r, t), (r, b)
        x, y = mouseevent.x, mouseevent.y
        inside = nxutils.pnpoly(x, y, xyverts)
        return inside,{}
def contains ( self , mouseevent ) : if callable ( self . _contains ) : return self . _contains ( self , mouseevent ) if not self . get_visible ( ) or self . _renderer is None : return False , { } l , b , w , h = self . get_window_extent ( ) . bounds r = l + w t = b + h xyverts = ( l , b ) , ( l , t ) , ( r , t ) , ( r , b ) x , y = mouseevent . x , mouseevent . y inside = nxutils . pnpoly ( x , y , xyverts ) return inside , { }
Test whether the mouse event occurred in the patch.
Test whether the mouse event occurred in the patch .
"""Test whether the mouse event occurred in the patch.

        In the case of text, a hit is true anywhere in the
        axis-aligned bounding-box containing the text.

        Returns True or False.
        """
self
mouseevent