Skip to content

Commit

Permalink
Merge pull request #13507 from meeseeksmachine/auto-backport-of-pr-13…
Browse files Browse the repository at this point in the history
…488-on-v3.1.x

Backport PR #13488 on branch v3.1.x (Animation:  interactive zoom/pan with blitting does not work)
  • Loading branch information
dstansby committed Feb 24, 2019
2 parents 35fbbb5 + 4ea8831 commit 2797c8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/matplotlib/animation.py
Expand Up @@ -1211,6 +1211,11 @@ def _setup_blit(self):
# axes
self._blit_cache = dict()
self._drawn_artists = []
for ax in self._fig.axes:
ax.callbacks.connect('xlim_changed',
lambda ax: self._blit_cache.pop(ax, None))
ax.callbacks.connect('ylim_changed',
lambda ax: self._blit_cache.pop(ax, None))
self._resize_id = self._fig.canvas.mpl_connect('resize_event',
self._handle_resize)
self._post_draw(None, self._blit)
Expand Down

0 comments on commit 2797c8c

Please sign in to comment.