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 4e87b19

Browse filesBrowse files
authored
Merge pull request #13229 from anntzer/animation_init
MNT: Prevent exception when running animation on Agg backend.
2 parents 010f2f4 + 1b81a08 commit 4e87b19
Copy full SHA for 4e87b19

File tree

Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,6 +1613,7 @@ def __init__(self, fig, func, frames=None, init_func=None, fargs=None,
16131613
else:
16141614
self._args = ()
16151615
self._func = func
1616+
self._init_func = init_func
16161617

16171618
# Amount of framedata to keep around for saving movies. This is only
16181619
# used if we don't know how many frames there will be: in the case
@@ -1644,7 +1645,7 @@ def __init__(self, fig, func, frames=None, init_func=None, fargs=None,
16441645
# As a workaround, convert save_count to a native python int.
16451646
self.save_count = int(self.save_count)
16461647

1647-
self._init_func = init_func
1648+
self._cache_frame_data = cache_frame_data
16481649

16491650
# Needs to be initialized so the draw functions work without checking
16501651
self._save_seq = []
@@ -1655,8 +1656,6 @@ def __init__(self, fig, func, frames=None, init_func=None, fargs=None,
16551656
# for a single frame from init, which is not what we want.
16561657
self._save_seq = []
16571658

1658-
self._cache_frame_data = cache_frame_data
1659-
16601659
def new_frame_seq(self):
16611660
# Use the generating function to generate a new frame sequence
16621661
return self._iter_gen()

0 commit comments

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