8000 Animation with blit broken · Issue #6332 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Animation with blit broken #6332

@wernight

Description

@wernight

Matplotliv 1.5.1 on Linux (Debian) should have animations fixed in 1.5.1 but I still get an error for what used to work.

Example:

%matplotlib inline
from pylab import *
import matplotlib.animation
import matplotlib.patches

fig, ax = plt.subplots(figsize=(13, 8))
def update(frame):  
    ax.add_patch(matplotlib.patches.Rectangle(numpy.array([0, 0]), 1, 1))
anim = matplotlib.animation.FuncAnimation(fig, update, frames=10, blit=True)  # blit=True !!
anim.save('anim.mp4', fps=20, writer='avconv', codec='libx264')

Gives:

python3.5/site-packages/matplotlib/animation.py in _draw_frame(self, framedata)
   1212         self._drawn_artists = self._func(framedata, *self._args)
   1213         if self._blit:
-> 1214             for a in self._drawn_artists:
   1215                 a.set_animated(self._blit)

TypeError: 'NoneType' object is not iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0