My program runs through a loop and is supposed to re-plot the graph after
each step (which includes a pause of 1 second). I can't get the plot to
refresh. I wrote the following simple program which has the same problem. I
tried both  draw() nor f.canvas.draw() works. I'm running it from ipython
-pylab

A similar problem was encountered here:
http://www.nabble.com/Plotting-loop-refuses-to-update-display-on-OS-X-td19818020.html
but I still don't know what to do.

### teststuff.py

import pylab
import time

def testRef():
    f = pylab.figure()
    ax = pylab.gca()
    pylab.show()
    for x in range(10):
        ax.axhline(x)
        time.sleep(1)
#        pylab.draw()
        f.canvas.draw()
        
testRef()
-- 
View this message in context: 
http://www.nabble.com/refreshing-plot-in-loop-tp20122473p20122473.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to