animation problems

I just installed matplotlib 1.1.0. When I try the animation examples from http://matplotlib.sourceforge.net/examples/animation/index.html, they just flash up a window for a fraction of a second, and then terminate with no message (animate_decay.py, strip_chart_demo.py, etc). Is this what they are supposed to do? The documentation at http://matplotlib.sourceforge.net/api/animation_api.html is very terse. When I include the line

im_ani.save('im.mp4')

in animate_basic_example.py, I get this crash:

kbriggs@...3910...:~> python animate_basic_example.py

Traceback (most recent call last):
  File "animate_basic_example.py", line 32, in <module>
    im_ani.save('im.mp4')
  File "/usr/local/lib/python2.7/site-packages/matplotlib/animation.py", line 127, in save
    self._make_movie(filename, fps, codec, frame_prefix)
  File "/usr/local/lib/python2.7/site-packages/matplotlib/animation.py", line 164, in _make_movie
    stdout=PIPE, stderr=PIPE)
  File "/usr/local/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/local/lib/python2.7/subprocess.py", line 1228, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Keith

Saving generally requires ffmpeg. You could try installing that or
commenting out the call to save().

Given that saving is half-baked at this point, a good maintainer of
this code *cough*me*cough* would probably make a problem saving not
completely crap out the script.

Ryan

···

On Mon, Jan 9, 2012 at 5:28 AM, <keith.briggs@...644...> wrote:

I just installed matplotlib 1.1.0. When I try the animation examples from http://matplotlib.sourceforge.net/examples/animation/index.html, they just flash up a window for a fraction of a second, and then terminate with no message (animate_decay.py, strip_chart_demo.py, etc). Is this what they are supposed to do? The documentation at http://matplotlib.sourceforge.net/api/animation_api.html is very terse. When I include the line

im_ani.save('im.mp4')

in animate_basic_example.py, I get this crash:

kbriggs@...3910...:~> python animate_basic_example.py

Traceback (most recent call last):
File "animate_basic_example.py", line 32, in <module>
im_ani.save('im.mp4')
File "/usr/local/lib/python2.7/site-packages/matplotlib/animation.py", line 127, in save
self._make_movie(filename, fps, codec, frame_prefix)
File "/usr/local/lib/python2.7/site-packages/matplotlib/animation.py", line 164, in _make_movie
stdout=PIPE, stderr=PIPE)
File "/usr/local/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/local/lib/python2.7/subprocess.py", line 1228, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma