Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d405b1c

Browse filesBrowse files
committed
Fix for issue #13478:
In an animation using blitting that contains some static graphics elements, the static parts of the figure are not updated after an interactive zoom/pan event. However, they are correctly updated after an resize event.
1 parent 1d7494f commit d405b1c
Copy full SHA for d405b1c

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,14 @@ def _setup_blit(self):
12221222
# axes
12231223
self._blit_cache = dict()
12241224
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)
12251233
self._resize_id = self._fig.canvas.mpl_connect('resize_event',
12261234
self._handle_resize)
12271235
self._post_draw(None, self._blit)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.