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

Method update

lib/matplotlib/widgets.py:2435–2455  ·  view source on GitHub ↗

Draw using blit() or draw_idle(), depending on ``self.useblit``.

(self)

Source from the content-addressed store, hash-verified

2433 event.button != self._eventpress.button)
2434
2435 def update(self):
2436 """Draw using blit() or draw_idle(), depending on ``self.useblit``."""
2437 if (not self.ax.get_visible() or
2438 self.ax.get_figure(root=True)._get_renderer() is None):
2439 return
2440 if self.useblit:
2441 background = self._load_blit_background()
2442 if background is not None:
2443 self.canvas.restore_region(background)
2444 else:
2445 self.update_background(None)
2446 # We need to draw all artists, which are not included in the
2447 # background, therefore we also draw self._get_animated_artists()
2448 # and we make sure that we respect z_order
2449 artists = sorted(self.artists + self._get_animated_artists(),
2450 key=lambda a: a.get_zorder())
2451 for artist in artists:
2452 self.ax.draw_artist(artist)
2453 self.canvas.blit(self.ax.bbox)
2454 else:
2455 self.canvas.draw_idle()
2456
2457 def _get_data(self, event):
2458 """Get the xdata and ydata for event, with limits."""

Callers 15

clearMethod · 0.95
set_propsMethod · 0.95
set_handle_propsMethod · 0.95
set_label_propsMethod · 0.45
set_frame_propsMethod · 0.45
set_check_propsMethod · 0.45
set_radio_propsMethod · 0.45
__init__Method · 0.45
new_axesMethod · 0.45
_pressMethod · 0.45
_releaseMethod · 0.45
_set_extentsMethod · 0.45

Calls 11

update_backgroundMethod · 0.95
_get_animated_artistsMethod · 0.95
_load_blit_backgroundMethod · 0.80
get_zorderMethod · 0.80
get_visibleMethod · 0.45
_get_rendererMethod · 0.45
get_figureMethod · 0.45
restore_regionMethod · 0.45
draw_artistMethod · 0.45
blitMethod · 0.45
draw_idleMethod · 0.45

Tested by

no test coverage detected