The easiest and fastest way to make GIFs and math videos with Python. How to create amazing animations in seconds using Celluloid.
“Celluloid, Easy Matplotlib Animations”
I really enjoy working with data visualization and I always wonder what’s the best way to provide more direct and intuitive visual interactions when I have to explain some result or complex model.
Lately, I’ve been growing to use GIFs and quick videos. Even if this makes the coding part harder and more complex, the result generally is much more efficient in communicating my findings and process.
But in Python, there’s always an easier and simpler way and to simplify the animating process, **[Celluloid](https://github.com/jwkvam/celluloid) was born.**
Using only 50 lines of code to deal with Matplotlib Artists and ArtistAnimations Celluloid creates an animation from the series of images you want to plot into the Camera abstraction.
Let’s start by installing the library with
$ pip install celluloid
Now let’s get to it!
Let’s create a simple plot just to demonstrate the basic usage of how to run the code in a Jupyter notebook, but we could also use the method save(‘filename.gif_or_mp4’)
from celluloid import Camera ## getting the camera import matplotlib.pyplot as plt import numpy as np from IPython.display import HTML ## to show the animation in Jupyter fig, ax = plt.subplots() ## creating my fig camera = Camera(fig)## the camera gets the fig we'll plot for i in range(10): ax.plot([i] * 5, c='black') ## 5 element array from 0 to 9 camera.snap() ## the camera takes a snapshot of the plot animation = camera.animate() ## animation ready HTML(animation.to_html5_video()) ## displaying the animation
Use this tutorial to learn how to create your first Jupyter Notebook, important terminology, and how easily notebooks can be shared and published online. The Jupyter Notebook is an incredibly powerful tool for interactively developing and presenting data science projects. This article will walk you through how to use Jupyter Notebooks for data science projects and how to set it up on your local machine
Why Jupyter Notebooks are the Future of Data Science. How Jupyter Notebooks played an important role in the incredible rise in popularity of Data Science and why they are its future.
🔥To access the slide deck used in this session for Free, click here: https://bit.ly/GetPDF_DataV_P 🔥 Great Learning brings you this live session on 'Data Vis...
Master Applied Data Science with Python and get noticed by the top Hiring Companies with IgmGuru's Data Science with Python Certification Program. Enroll Now
These data science tools illustrated guides are broken up into four distinct categories: data retrieval, data manipulation, data visualization, and engineering tips. Both online and PDF versions of these guides are available.