MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / _get_data

Method _get_data

site-packages/matplotlib/widgets.py:1545–1555  ·  view source on GitHub ↗

Get the xdata and ydata for event, with limits

(self, event)

Source from the content-addressed store, hash-verified

1543 return False
1544
1545 def _get_data(self, event):
1546 """Get the xdata and ydata for event, with limits"""
1547 if event.xdata is None:
1548 return None, None
1549 x0, x1 = self.ax.get_xbound()
1550 y0, y1 = self.ax.get_ybound()
1551 xdata = max(x0, event.xdata)
1552 xdata = min(x1, xdata)
1553 ydata = max(y0, event.ydata)
1554 ydata = min(y1, ydata)
1555 return xdata, ydata
1556
1557 def _clean_event(self, event):
1558 """Clean up an event

Callers 8

_clean_eventMethod · 0.95
_pressMethod · 0.45
_releaseMethod · 0.45
_onmoveMethod · 0.45
_set_span_xyMethod · 0.45
_pressMethod · 0.45
_releaseMethod · 0.45
_onmoveMethod · 0.45

Calls 4

maxFunction · 0.85
minFunction · 0.85
get_xboundMethod · 0.80
get_yboundMethod · 0.80

Tested by

no test coverage detected