Hello darkside,

I set up a little program hoping it offers a solution to your problem.

Matthias
>-------------------------------------------------------------------------------
from numpy.random import uniform 
import pylab 

Nt = 20
x,y = uniform(size=(100,Nt+1)),uniform(size=(100,Nt+1))

pylab.ion()
ax1 = pylab.subplot(211)
pylab.ylabel('Posiciones')
ax2 = pylab.subplot(212)
pylab.ylabel('Momentos')
line1,= ax1.plot(x[:,0], x[:,1])
line2,= ax2.plot(y[:,0], y[:,1])
pylab.draw()
pylab.draw()
# alternative you could use
"""
pylab.axes(ax1)
line1,= pylab.plot(x[:,0], x[:,1])
pylab.axes(ax2)
line2,= pylab.plot(y[:,0], y[:,1])
pylab.draw()
"""
for k in pylab.arange(Nt):
    line1.set_ydata(x[:,k+1])
    line2.set_ydata(y[:,k+1])
    pylab.draw()
    pylab.draw()
pylab.ioff()
pylab.show()
>-------------------------------------------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to