'''
Created on 30-Jun-2020

@author: Rishi Priyansh
'''
import matplotlib
from matplotlib import pyplot as plt
from celluloid import Camera

        plt.style.use('ggplot')
        
        fig = plt.figure()
        camera = Camera(fig)
        for i in range(20):
            t = plt.plot(range(i, i + 5))
            plt.legend(t, [f'line {i}'])
            camera.snap()
        animation = camera.animate()
        animation.save('celluloid_legends.mp4')
print('h')