MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / inaxes

Method inaxes

lib/matplotlib/backend_bases.py:1901–1923  ·  view source on GitHub ↗

Return the topmost visible `~.axes.Axes` containing the point *xy*. Parameters ---------- xy : (float, float) (x, y) pixel positions from left/bottom of the canvas. Returns ------- `~matplotlib.axes.Axes` or None The

(self, xy)

Source from the content-addressed store, hash-verified

1899 del self._blit_backgrounds[bb_id]
1900
1901 def inaxes(self, xy):
1902 """
1903 Return the topmost visible `~.axes.Axes` containing the point *xy*.
1904
1905 Parameters
1906 ----------
1907 xy : (float, float)
1908 (x, y) pixel positions from left/bottom of the canvas.
1909
1910 Returns
1911 -------
1912 `~matplotlib.axes.Axes` or None
1913 The topmost visible Axes containing the point, or None if there
1914 is no Axes at the point.
1915 """
1916 axes_list = [a for a in self.figure.get_axes()
1917 if a.patch.contains_point(xy) and a.get_visible()]
1918 if axes_list:
1919 axes = cbook._topmost_artist(axes_list)
1920 else:
1921 axes = None
1922
1923 return axes
1924
1925 def grab_mouse(self, ax):
1926 """

Callers 2

__init__Method · 0.80

Calls 2

contains_pointMethod · 0.45
get_visibleMethod · 0.45

Tested by 1