Hi all,
I have a script to update a plot in real time. It was working fine with 
matplotlib 0.99.1.1 but it doesn't work anymore with the new version. 

Here is the script:

import numpy as n
import pylab as p

x=n.arange(10)
y=n.random.randn(10)
p.ion()
fig=p.figure(1)
ax=fig.add_subplot(111)
line,=ax.plot(x,y,'ko-')
for i in range(10):
    y=n.random.randn(10)
    line.set_data(x,y)
    p.draw()


it is updating the plot correctly with matplotlib 0.99.1.1
when I run it with matplotlib 1.0.0
it doesn't show any picture at all

Interestingly, if I add a line raw_input('ok') then it shows the plot and it 
updates it inside the loop....


x=n.arange(10)
y=n.random.randn(10)
p.ion()
fig=p.figure(1)
ax=fig.add_subplot(111)
line,=ax.plot(x,y,'ko-')
raw_input('ok?')
for i in range(10):
    y=n.random.randn(10)
    line.set_data(x,y)
    p.draw()
    raw_input('ok?')

Any idea why it is doing this? Is it a bug or am I missing something?

Thanks for your help,
Chiara

                                          
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to