daleroberts / itermplot

An awesome iTerm2 backend for Matplotlib, so you can plot directly in your terminal.
1.49k stars 51 forks source link

Add GIF Animation Support #12

Closed garywu closed 7 years ago

garywu commented 7 years ago

Supports gif animation from matplotlib's animation module. By simulating timer from GUI in the canvas and manually advance timer and grab frame each step. Tested with all example animation scripts from https://github.com/matplotlib/matplotlib/tree/master/examples/animation. Everything works except unchained.py which produces a blank white gif. Also tested few scripts found around the web. Activated by env ITERMPLOT_FRAMES and ITERMPLOT_OUTFILE fall back to original code if env is not specified.

daleroberts commented 7 years ago

Looks good! Animations present in the console seem to make it a bit laggy but not our problem...