From: Todd M. <jm...@st...> - 2005-01-11 19:44:34
|
Hi Hans, I just tried this out and found that setting "interactive" to "True" in C:\python23\share\matplotlib\.matplotlibrc obviated the need to use the show() command. The plot then comes up as soon as you issue the plot() command. Multiple plotting-closing cycles worked fine in the same Idle session. Regards, Todd On Tue, 2005-01-11 at 14:29, Hans Fangohr wrote: > Dear all, > > I tried to make matplotlib work with IDLE on Windows. I have settled for > the Enthough Python Edition and the latest matplotlib (both executables > can be found in www.soton.ac.uk/~fangohr/download/python). > > I have prepared the exercises on linux and am now trying to run them in > windows. This is where I realised that matplotlib doesn't work well with > IDLE. > > More particularly, it is known that the default backend TkAgg doesn't work > with IDLE (see here http://matplotlib.sourceforge.net/backends.html#TkAgg) > but it appears to work with "IDLE -n" (as it says on that web page). > > The problem I experience is this: > > -start idle > -execute these commands: > > import pylab > pylab.plot(range(10)) > pylab.show() > > This produces a figure window which seems to work fine. > > At this point when closing the figure window, I can't get the IDLE > prompt active again. (It seems that IDLE thinks the program and the figure > process are still running, and is waiting for control to return.) > > This, in itself, is maybe not suprising. However, the idle -n switch > doesn't seem to solve the problem for me (see below). > > The same problem is observed when I execute a program in the IDLE editor > (by pressing F5). > > Maybe this is the problem: > > I have tried to tell IDLE to start with the "-n" by modifying the properties for the > IDLE link in the start menu from > > C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw" > > to > > C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw" "-n" > > but this doesn't seem to solve the problem: I get exactly the same > behaviour as described above. Am I doing the right thing? > > Can anyone give me some advice? > > Many thanks, > > Hans > > > P.S. Funnily enough, there are two Windows machines with a very similar > software setup, i.e. enthought python plus matplotlib, where the default > TkAgg interface seems to work happily togethe with IDLE. Unfortunately, > these are not the ones I am trying to get to work :-| > > > > > > ------------------------------------------------- > Dr Hans Fangohr > > Computational Engineering & Design Research Group > School of Engineering Sciences > University of Southampton > Southampton, SO17 1BJ > United Kingdom > > Location: Building 25, Room 1027 > phone : +44 (0) 23 8059 8345 > fax : +44 (0) 23 8059 7082 > email : fa...@so... > ------------------------------------------------- > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- |