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

Method get_cursor_data

lib/matplotlib/image.py:1196–1204  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

1194 super().set_cmap(cmap)
1195
1196 def get_cursor_data(self, event):
1197 # docstring inherited
1198 x, y = event.xdata, event.ydata
1199 if (x < self._Ax[0] or x > self._Ax[-1] or
1200 y < self._Ay[0] or y > self._Ay[-1]):
1201 return None
1202 j = np.searchsorted(self._Ax, x) - 1
1203 i = np.searchsorted(self._Ay, y) - 1
1204 return self._A[i, j]
1205
1206
1207class PcolorImage(AxesImage):

Callers 1

Calls

no outgoing calls

Tested by 1