[IPython-User] matplotlib / pylab update delay.
Mon Aug 16 07:22:15 CDT 2010
A while ago I reported that in iPython 0.10, figures did not update as
quickly as they should when running "ipython -pylab". I've finally
gotten around to testing this out with the nightly-build of 0.11.
An example of this problem is: docs/examples/lib/gui-mpl.py, the
number displayed on the figure title usually lags the number written
to stdout by one. Sometimes you get nondeterministic behaviour where
two "frames" are displayed in very quick succession.
To see this you need to add a delay, so I have attached a version of
the file hacked appropriately. Gui used the last time I ran it was
qt4, but I have also observed this with gtk.
-- Here is my original report
On 19 May 2010 19:22, Brian Granger <email@example.com> wrote:
> Which version of IPython are you running?
> On Wed, May 19, 2010 at 5:13 AM, Adrian Ratnapala
> <firstname.lastname@example.org> wrote:
>> If I run ipython -pylab, and then run a script with graphics,
>> when are the plots supposed to be updated. Suppose I
>> have a long computation and want to give the viewers
>> some information while it happens. Then I might do:
>> from pylab import *
>> from numpy import *
>> import sys, time
>> x = linspace(-1, 1, 101)
>> for k in range(4) :
>> plot( x, (1+k) * x**2 )
>> print 'quad term = ' , 1+k
>> time.sleep(3) # or some other long computation.
>> However, I find that the visible plot is always one iteration
>> behind what is reported on stdout.
>> Another, probably related problem, is that the GUI is
>> unresponsive when such scripts run. Presumably
>> this second problem is hard to fix, because the
>> computation and the GUI are running in the same
>> thread. However, I just don't understand the delayed
>> Adrian Ratnapala
>> Centre for Cold Matter,
>> The Blackett Laboratory,
>> Imperial College London,
>> Prince Consort Road,
>> London SW7 2AZ.
>> Tel: +44-(0)2075947864
>> Fax: +44-(0)2075947714
>> IPython-User mailing list
> Brian E. Granger, Ph.D.
> Assistant Professor of Physics
> Cal Poly State University, San Luis Obispo
Centre for Cold Matter,
The Blackett Laboratory,
Imperial College London,
Prince Consort Road,
London SW7 2AZ.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1385 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/ipython-user/attachments/20100816/026619ae/attachment.py
More information about the IPython-User