Created
April 13, 2019 13:43
-
-
Save parulnith/99289d99473993c7d311c1be4ecf30c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from matplotlib import pyplot as plt | |
from celluloid import Camera | |
fig, axes = plt.subplots(2) | |
camera = Camera(fig) | |
t = np.linspace(0, 2 * np.pi, 128, endpoint=False) | |
for i in t: | |
axes[0].plot(t, np.sin(t + i), color='blue') | |
axes[1].plot(t, np.sin(t - i), color='blue') | |
camera.snap() | |
animation = camera.animate() | |
animation.save('celluloid_subplots.gif', writer = 'imagemagick') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice, wonderful imaging voice sounds