This file should work, but it doesn't:
from matplotlib import pyplot
pyplot.ion()
pyplot.plot(range(10))
raw_input('Press return to close')
The plot window appears, the inside is white and the hourglass cursor is shown. The text is printed in the shell, and hitting return closes the empty plot window.
I can plot from ipython, but this has to run from a file. Exactly the same problem as Using ion() from pylab causes matplotlib to hang , but the solution doesn't help me.
I am using Qt4Agg, by default. I haven't changed any settings, it is a fresh Anaconda install.
I don't think this is Anaconda specific, I had exactly the same problem some time ago with a normal Python install, but I don't remember the solution.
I recently upgraded Matplotlib to 1.3.1 np18py27_1
Current conda install:
platform : win-32
conda version : 3.0.6
python version : 2.7.6.final.0
root environment : C:\Anaconda (writable)
default environment : C:\Anaconda
envs directories : C:\Anaconda\envs
package cache : C:\Anaconda\pkgs
channel URLs : http://repo.continuum.io/pkgs/free/win-32/
http://repo.continuum.io/pkgs/pro/win-32/
config file : None
is foreign system : False
ion()as well while my code worked fine on linux. For me it helped to introduce a very short pause which enabled windows to not show a white window. The code I needed to include was:pylab.pause(1.e-6). Does this work for you as well? - The Dudepyplot.draw(). With this piece of code the interactive plot is updated with the new data. - The Dude