Skip to content

Commit 4ea8831

Browse files
timhoffmMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #13488: Animation: interactive zoom/pan with blitting does not work
1 parent 35fbbb5 commit 4ea8831

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)