Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double_pendulum_animated.py in 1.2.1 fails due to clear_temp kwarg #2763

Merged
merged 1 commit into from Jan 27, 2014

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Jan 27, 2014

I added these lines to the top of the file (http://matplotlib.org/1.2.1/examples/animation/double_pendulum_animated.html):

from matplotlib import __version__
print("matplotlib version: {}".format(__version__))
import os
os.system('ffmpeg')
Python 2.7.5+ (default, Sep 19 2013, 13:48:49) 
Type "copyright", "credits" or "license" for more information.

IPython 1.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: run double_pendulum_animated.py
matplotlib version: 1.2.1
ffmpeg version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:09:46 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/usr/local/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
    202             else:
    203                 filename = fname
--> 204             __builtin__.execfile(filename, *where)

/home/moorepants/Desktop/double_pendulum_animated.py in <module>()
     90     interval=25, blit=True, init_func=init)
     91 
---> 92 ani.save('double_pendulum.ogv', fps=15, clear_temp=True)
     93 plt.show()

TypeError: save() got an unexpected keyword argument 'clear_temp'

@pelson
Copy link
Member

pelson commented Jan 27, 2014

Confirmed on master.

@mdboom
Copy link
Member

mdboom commented Jan 27, 2014

@dopplershift: As the animation guy, do you have any thoughts?

The example goes way back, so I think perhaps this a bit of old animation API usage that didn't get updated to the new API. That's only my best guess.

In any event, the clear_temp=True is the default behavior anyway, so you can safely just remove it from the example (and then things work for me).

I'd suggest we remove it from the example in the matplotlib source, and then open a new issue that maybe we should provide a way to pass it down to the levels that need it.

pelson added a commit that referenced this pull request Jan 27, 2014
double_pendulum_animated.py in 1.2.1 fails due to clear_temp kwarg
@pelson pelson merged commit 762070b into matplotlib:master Jan 27, 2014
@mdboom mdboom deleted the remove-clear-temp branch August 7, 2014 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants