On 14/02/07, Ewald Zietsman <[EMAIL PROTECTED]> wrote: > Hi All, > > I have a slight problem using matplotlib 0.87.7. I'm using Ubuntu 6.10 and > installed mpl from source. I'm running numpy 1.01, also installed from > source. > > If I run the script below, the first plot shows fine. When I close it the > second plot should display but it doesn't. I can only get the first plot to > show. Thereafter the plot command doesn't seem to work. I tried reinstalling > matplotlib. That didn't work. This works fine if I type it into ipython. It > also works on my computer running FC5. > > Any help will be greatly appreciated. > > -Ewald > > # Sample script > from pylab import * > t = arange(10) > f = t*t > plot(t,f) > show() > plot(t,f) > show() > Ewald,
It may be that what you are trying should work. However, I believe that for interactive work it is recommended to use ipython -pylab unless you are using the TkAgg backend. You select this in your matplotlibrc file (it should go into ~/.matplotlib) OR (see http://matplotlib.sourceforge.net/faq.html) you can do the use command before importing pylab, as described at http://matplotlib.sourceforge.net/backends.html >>> import matplotlib >>> matplotlib.use('TkAgg') >>> from pylab import * Note that if you are using an IDE like pycrust, ipython -pylab, pythonwin, or IDLE, pylab may have already been loaded, and subsequent calls to use or from pylab import * will have no effect unless you explicitly force a module reload. HTH. George Nurser. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users