8000 Merge pull request #13507 from meeseeksmachine/auto-backport-of-pr-13… · matplotlib/matplotlib@2797c8c · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 2797c8c

Browse files
authored
Merge pull request #13507 from meeseeksmachine/auto-backport-of-pr-13488-on-v3.1.x
Backport PR #13488 on branch v3.1.x (Animation: interactive zoom/pan with blitting does not work)
2 parents 35fbbb5 + 4ea8831 commit 2797c8c

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)
0