Skip to content Skip to sidebar Skip to footer

Animation Doesn't Work In Python

Where is normal explanation on how to plot animated graphs in Python? I wrote this from pylab import * import time ion() tstart = time.time() # for profiling x = a

Solution 1:

try :

from pylab import *
import time

ion()

tstart = time.time()               # for profiling
x = arange(0,2*pi,0.01)            # x-array
line, = plot(x,sin(x))
for i in arange(1,200000):
    line.set_ydata(sin(x+i/10.0))  # update the datadraw()                         # redraw the canvaspause(0.5)

With pause time in second

Post a Comment for "Animation Doesn't Work In Python"