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

Function wrapper

lib/matplotlib/widgets.py:183–193  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

181 # because that can introduce floating point errors for synthetic events.
182 @functools.wraps(func)
183 def wrapper(self, event):
184 if event.inaxes is not self.ax:
185 event = copy.copy(event)
186 event.guiEvent = None
187 event.inaxes = self.ax
188 try:
189 event.xdata, event.ydata = (
190 self.ax.transData.inverted().transform((event.x, event.y)))
191 except ValueError: # cf LocationEvent._set_inaxes.
192 event.xdata = event.ydata = None
193 return func(self, event)
194
195 return wrapper
196

Callers

nothing calls this directly

Calls 4

funcFunction · 0.50
copyMethod · 0.45
transformMethod · 0.45
invertedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…