Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9221a55

Browse files
authored
Merge pull request #13488 from onatt/animation-fix-#13478
Animation: interactive zoom/pan with blitting does not work
2 parents 74640bb + 03d41e8 commit 9221a55

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/animation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,11 @@ def _setup_blit(self):
12111211
# axes
12121212
self._blit_cache = dict()
12131213
self._drawn_artists = []
1214+
for ax in self._fig.axes:
1215+
ax.callbacks.connect('xlim_changed',
1216+
lambda ax: self._blit_cache.pop(ax, None))
1217+
ax.callbacks.connect('ylim_changed',
1218+
lambda ax: self._blit_cache.pop(ax, None))
12141219
self._resize_id = self._fig.canvas.mpl_connect('resize_event',
12151220
self._handle_resize)
12161221
self._post_draw(None, self._blit)

0 commit comments

Comments
 (0)