Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Interactive Applications using Matplotlib
  • Table Of Contents Toc
  • Feedback & Rating feedback
Interactive Applications using Matplotlib

Interactive Applications using Matplotlib

3.3 (6)
close
close
Interactive Applications using Matplotlib

Interactive Applications using Matplotlib

3.3 (6)

Overview of this book

This book is intended for Python programmers who want to do more than just see their data. Experience with GUI toolkits is not required, so this book can be an excellent complement to other GUI programming resources.
Table of Contents (7 chapters)
close
close

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...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY