Skip to content

Instantly share code, notes, and snippets.

@parulnith
Created April 13, 2019 13:41
Show Gist options
  • Select an option

  • Save parulnith/40f26938ab2ca684e81550cfa1974d64 to your computer and use it in GitHub Desktop.

Select an option

Save parulnith/40f26938ab2ca684e81550cfa1974d64 to your computer and use it in GitHub Desktop.
from matplotlib import pyplot as plt
from celluloid import Camera
fig = plt.figure()
camera = Camera(fig)
for i in range(10):
plt.plot([i] * 10)
camera.snap()
animation = camera.animate()
animation.save('celluloid_minimal.gif', writer = 'imagemagick')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment