(self, event)
| 2269 | info["background"] = canvas.copy_from_bbox(canvas.figure.bbox) |
| 2270 | |
| 2271 | def onmove(self, event): |
| 2272 | axs = [ax for ax in self.axes if ax.contains(event)[0]] |
| 2273 | if self.ignore(event) or not axs or not event.canvas.widgetlock.available(self): |
| 2274 | return |
| 2275 | ax = cbook._topmost_artist(axs) |
| 2276 | xdata, ydata = ((event.xdata, event.ydata) if event.inaxes is ax |
| 2277 | else ax.transData.inverted().transform((event.x, event.y))) |
| 2278 | for line in self.vlines: |
| 2279 | line.set_xdata((xdata, xdata)) |
| 2280 | line.set_visible(self.visible and self.vertOn) |
| 2281 | for line in self.hlines: |
| 2282 | line.set_ydata((ydata, ydata)) |
| 2283 | line.set_visible(self.visible and self.horizOn) |
| 2284 | if not (self.visible and (self.vertOn or self.horizOn)): |
| 2285 | return |
| 2286 | # Redraw. |
| 2287 | if self.useblit: |
| 2288 | for canvas, info in self._canvas_infos.items(): |
| 2289 | if info["background"]: |
| 2290 | canvas.restore_region(info["background"]) |
| 2291 | if self.vertOn: |
| 2292 | for ax, line in zip(self.axes, self.vlines): |
| 2293 | ax.draw_artist(line) |
| 2294 | if self.horizOn: |
| 2295 | for ax, line in zip(self.axes, self.hlines): |
| 2296 | ax.draw_artist(line) |
| 2297 | for canvas in self._canvas_infos: |
| 2298 | canvas.blit() |
| 2299 | else: |
| 2300 | for canvas in self._canvas_infos: |
| 2301 | canvas.draw_idle() |
| 2302 | |
| 2303 | |
| 2304 | class _SelectorWidget(AxesWidget): |
nothing calls this directly
no test coverage detected