Matplotlib is the standard graphics library for python and comes with a pretty decent animation package. Jake Vanderplas has an excellent tutorial on using this here .
Taking from this link, if you want to animate a sine wave, you should use the following method:
import numpy as np from matplotlib import pyplot as plt from matplotlib import animation
The animation library calls the function "animate" once in each interval (in this example, 20 is specified). The function must update the graphics accordingly. In this case, it updates the line, which is an array of sine wave data using the set_data method.
jiminy_crist
source share