Skip to content

Instantly share code, notes, and snippets.

@rockinhumingbird
Created October 30, 2019 10:58
Show Gist options
  • Select an option

  • Save rockinhumingbird/95f39c902cda9b9da87287a44e6982dc to your computer and use it in GitHub Desktop.

Select an option

Save rockinhumingbird/95f39c902cda9b9da87287a44e6982dc to your computer and use it in GitHub Desktop.
gif
from IPython.display import HTML
fig, ax = plt.subplots(figsize=(15, 8))
animator = animation.FuncAnimation(fig, draw_barchart,frames=(1980, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012))
HTML(animator.to_jshtml())
# .save as gif or mp4 fps is the speed and dpi is the resolution
animator.save('moneyraise.gif', fps=.5, dpi=200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment