In [1]:
from os import environ
environ['MPLBACKEND'] = 'module://gr.matplotlib.backend_gr'
In [2]:
from pylab import plot, draw, pause
from numpy import arange, sin, pi
In [3]:
import gr
gr.inline('mov')
In [4]:
x = arange(0, 2 * pi, 0.01)
In [5]:
line, = plot(x, sin(x))
for i in arange(1, 200):
    line.set_ydata(sin(x + i / 10.0))
    draw()
    pause(0.0001)
In [6]:
gr.show()
Out[6]: