From: John H. <jdh...@ac...> - 2005-04-26 21:27:14
|
>>>>> "ravi" == ravi <ra...@gm...> writes: ravi> Hi, I just upgraded to 0.80 from 0.73.1 on a Fedora Core 3 ravi> machine. I am (and have been) using ipython 0.6.13 as my ravi> shell. After the upgrade, plots from scripts are no longer ravi> interactive - I need an explicit call to pylab.show() to ravi> show the plots. ravi> Do I need to update some settings? I am using the GTKAgg ravi> backend with all default parameters (no user-specific ravi> .matplotlibrc) and I compiled matplotlib from sources. Here ravi> is a simple script that no longer updates 100 times but just ravi> shows once: Fernando and I made a conscious choice to turn off interactive mode when running scripts from ipython, since this is usually what people want and has better performance. To override this, to need to explicitly turn on/and off interactive mode where desired, and possibly explicitly call draw in the animation loop where you want the figure to be refreshed. import scipy import matplotlib from matplotlib import pylab pylab.ion() # turn on interactive mode for x in scipy.arange(100): pylab.plot(scipy.randn(1000)+x) pylab.show() You can turn interactive mode on and off where desired with pylab.ion and pylab.ioff (to suppress draws for a sequence of figure updates) and explicitly draw where desired with pylab.draw. Details at http://matplotlib.sf.net/interactive.html. JDH |