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

Method _onmove

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

on motion notify event

(self, event)

Source from the content-addressed store, hash-verified

1843 return False
1844
1845 def _onmove(self, event):
1846 """on motion notify event"""
1847 if self.pressv is None:
1848 return
1849
1850 self._set_span_xy(event)
1851
1852 if self.onmove_callback is not None:
1853 vmin = self.pressv
1854 xdata, ydata = self._get_data(event)
1855 if self.direction == 'horizontal':
1856 vmax = xdata or self.prev[0]
1857 else:
1858 vmax = ydata or self.prev[1]
1859
1860 if vmin > vmax:
1861 vmin, vmax = vmax, vmin
1862 self.onmove_callback(vmin, vmax)
1863
1864 self.update()
1865 return False
1866
1867 def _set_span_xy(self, event):
1868 """Setting the span coordinates"""

Callers

nothing calls this directly

Calls 3

_set_span_xyMethod · 0.95
_get_dataMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected