Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC : whole bunch of documentation clean up #3170

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

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC : removed old movie example from FAQ
  • Loading branch information
tacaswell committed Jul 18, 2014
commit 9e1c9cf74df96670de58c63ffa1d884eeabab812
47 changes: 0 additions & 47 deletions doc/faq/howto_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -322,53 +322,6 @@ some ratio which controls the ratio::
See :ref:`pylab_examples-equal_aspect_ratio` for a complete example.


.. _howto-movie:

Make a movie
------------

If you want to take an animated plot and turn it into a movie, the
best approach is to save a series of image files (eg PNG) and use an
external tool to convert them to a movie. You can use `mencoder
<http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html>`_,
which is part of the `mplayer <http://www.mplayerhq.hu>`_ suite
for this::

#fps (frames per second) controls the play speed
mencoder 'mf://*.png' -mf type=png:fps=10 -ovc \\
lavc -lavcopts vcodec=wmv2 -oac copy -o animation.avi

The swiss army knife of image tools, ImageMagick's `convert
<http://www.imagemagick.org/script/convert.php>`_ works for this as
well.

Here is a simple example script that saves some PNGs, makes them into
a movie, and then cleans up::

import os, sys
import matplotlib.pyplot as plt

files = []
fig = plt.figure(figsize=(5,5))
ax = fig.add_subplot(111)
for i in range(50): # 50 frames
ax.cla()
ax.imshow(rand(5,5), interpolation='nearest')
fname = '_tmp%03d.png'%i
print 'Saving frame', fname
fig.savefig(fname)
files.append(fname)

print 'Making movie animation.mpg - this make take a while'
os.system("mencoder 'mf://_tmp*.png' -mf type=png:fps=10 \\
-ovc lavc -lavcopts vcodec=wmv2 -oac copy -o animation.mpg")

.. htmlonly::

Josh Lifton provided this example :ref:`old_animation-movie_demo`, which
is possibly dated since it was written in 2004.


.. _howto-twoscale:

Multiple y-axis scales
Expand Down