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

Method _on_resize

lib/matplotlib/animation.py:1254–1264  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

1252 self._on_resize)
1253
1254 def _on_resize(self, event):
1255 # On resize, we need to disable the resize event handling so we don't
1256 # get too many events. Also stop the animation events, so that
1257 # we're paused. Reset the cache and re-init. Set up an event handler
1258 # to catch once the draw has actually taken place.
1259 self._fig.canvas.mpl_disconnect(self._resize_id)
1260 self.event_source.stop()
1261 self._blit_cache.clear()
1262 self._init_draw()
1263 self._resize_id = self._fig.canvas.mpl_connect('draw_event',
1264 self._end_redraw)
1265
1266 def _end_redraw(self, event):
1267 # Now that the redraw has happened, do the post draw flushing and

Callers

nothing calls this directly

Calls 5

_init_drawMethod · 0.95
mpl_disconnectMethod · 0.80
stopMethod · 0.80
mpl_connectMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected