Hi Everyone,

I'm puzzled by the following problem:
If I do plot updates by using a callback triggered by the multiprocessing 
module's apply_async then the updates do not take - only the final result is 
shown, as if in non-interactive mode.

What could be the cause for this? Are there known issues using the 
multiprocessing module and interactive mode in matplotlib.

Thanks!
-Kaushik

matplotlib.__version__ -> '0.99.1.1'

Example code is below:

import pylab
import time
from multiprocessing import Pool

pylab.ion()
x = pylab.arange(0,2*pylab.pi,0.01)
line, = pylab.plot(x,pylab.sin(x))
start_time = time.time()

def time_waster():
   time.sleep(1)

def plot(Dummy=None):
   t = time.time() - start_time
   print t
   line.set_ydata(pylab.sin(x+t/1.0))
   pylab.draw()

for i in range(200):
   plot()

pool = Pool()
for N in range(60):
   pool.apply_async(time_waster,(),{},plot)
pool.close()
pool.join()

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to