Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d405b1c commit 03d41e8Copy full SHA for 03d41e8
lib/matplotlib/animation.py
@@ -1222,14 +1222,11 @@ def _setup_blit(self):
1222
# axes
1223
self._blit_cache = dict()
1224
self._drawn_artists = []
1225
- def remove_from_cache(ax):
1226
- try:
1227
- del self._blit_cache[ax]
1228
- except KeyError:
1229
- pass
1230
for ax in self._fig.axes:
1231
- ax.callbacks.connect('xlim_changed', remove_from_cache)
1232
- ax.callbacks.connect('ylim_changed', remove_from_cache)
+ ax.callbacks.connect('xlim_changed',
+ lambda ax: self._blit_cache.pop(ax, None))
+ ax.callbacks.connect('ylim_changed',
1233
self._resize_id = self._fig.canvas.mpl_connect('resize_event',
1234
self._handle_resize)
1235
self._post_draw(None, self._blit)
0 commit comments