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

Method _get_data

lib/matplotlib/widgets.py:2457–2463  ·  view source on GitHub ↗

Get the xdata and ydata for event, with limits.

(self, event)

Source from the content-addressed store, hash-verified

2455 self.canvas.draw_idle()
2456
2457 def _get_data(self, event):
2458 """Get the xdata and ydata for event, with limits."""
2459 if event.xdata is None:
2460 return None, None
2461 xdata = np.clip(event.xdata, *self.ax.get_xbound())
2462 ydata = np.clip(event.ydata, *self.ax.get_ybound())
2463 return xdata, ydata
2464
2465 def _clean_event(self, event):
2466 """

Callers 4

_clean_eventMethod · 0.95
_pressMethod · 0.80
_releaseMethod · 0.80
_onmoveMethod · 0.80

Calls 3

get_xboundMethod · 0.80
get_yboundMethod · 0.80
clipMethod · 0.45

Tested by

no test coverage detected