Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Interactive Applications using Matplotlib

You're reading from   Interactive Applications using Matplotlib

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781783988846
Length 174 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

The fastest draw in the west


Your manager stops by your cubicle and says, "You know that track editor thing you have been working on? Yeah, I am going to need a movie of it that I can put it into a presentation for the Bobs by the end of the day. Mmm-kay? That would be great."

Don't freak out! Take a deep breath and think about it for a moment. At the end of the previous chapter, didn't we have something that looked a lot like an animation when pressing the arrow keys? All of the major code pieces are in place already. You just need something that can save the frames automatically, preferably right into an appropriate movie format. You don't have much time, so let's quickly jury-rig something for this one-off task and then worry about making it right later. Take the chp2/stormcell_editor2.py script we left off in the previous chapter and replace the final plt.show() function with the following few lines:

Source: chp3/quick_animation.py

from matplotlib.animation import FuncAnimation 
anim...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image