Ok, it is a backend issue:
I checked and I was using Qt4Agg
as soon as I changed to TkAgg the script worked fine...
still is this normal or is it a bug?
thanks for your suggestion and help!
Chiara
From: chiaracaro...@hotmail.com
To: ben.r...@ou.edu
Date: Sat, 28 Aug 2010 03:01:54 +0000
CC: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] realtime plotting was working with matplotlib
0.99.1.1 and it doesn't with matplotlib 1.0.0
I think I am using TkAgg but I am not sure, how can I check it?
From: ben.r...@ou.edu
Date: Fri, 27 Aug 2010 21:50:19 -0500
Subject: Re: [Matplotlib-users] realtime plotting was working with matplotlib
0.99.1.1 and it doesn't with matplotlib 1.0.0
To: chiaracaro...@hotmail.com
CC: matplotlib-users@lists.sourceforge.net
On Fri, Aug 27, 2010 at 9:26 PM, Chiara Caronna <chiaracaro...@hotmail.com>
wrote:
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
It seems to work fine for me using the GTKAgg backend. Which backend are you
using? Also, admittedly, this is the trunk build, so it might have some fixes
that weren't in the release.
Ben Root
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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