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

Method wheelEvent

lib/matplotlib/backends/backend_qt.py:361–373  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

359 guiEvent=event)._process()
360
361 def wheelEvent(self, event):
362 # from QWheelEvent::pixelDelta doc: pixelDelta is sometimes not
363 # provided (`isNull()`) and is unreliable on X11 ("xcb").
364 if (event.pixelDelta().isNull()
365 or QtWidgets.QApplication.instance().platformName() == "xcb"):
366 steps = event.angleDelta().y() / 120
367 else:
368 steps = event.pixelDelta().y()
369 if steps and self.figure is not None:
370 MouseEvent("scroll_event", self,
371 *self.mouseEventCoords(event), step=steps,
372 modifiers=self._mpl_modifiers(),
373 guiEvent=event)._process()
374
375 def keyPressEvent(self, event):
376 key = self._get_key(event)

Callers

nothing calls this directly

Calls 5

mouseEventCoordsMethod · 0.95
_mpl_modifiersMethod · 0.95
MouseEventClass · 0.90
yMethod · 0.80
_processMethod · 0.80

Tested by

no test coverage detected