if I rerun the script it works... don't ask why.
But I get an error when saving the animation.

In [11]: matplotlib.__version__
Out[11]: '1.3.0'

I get:

/Users/alex/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc
in print_raw(self, filename_or_obj, *args, **kwargs)
    495             close = False
    496         try:
--> 497             renderer._renderer.write_rgba(filename_or_obj)
    498         finally:
    499             if close:

RuntimeError: Error writing to file