Got problem in rendering animation(TkAgg)

I wrote the following scripts and expected that the y-axis of the figure
changed after each calculation.
But it did't work(the plot stayed at the very first state)
Can somebody help me fix this?


import numpy
import matplotlib
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111)

def calulate1(steps_num):
    cell_num = 200 # Set the cell number.
    hy = numpy.zeros((1,cell_num),float)
    hy = hy[0]
    line,=ax.plot(cell, hy)
    while NSTEPS<=steps_num:
        for k in cell[:cell_num-1]:

win = fig.canvas.manager.window
fig.canvas.manager.window.after(200, calulate1(20))


View this message in context:
Sent from the matplotlib - users mailing list archive at