On Monday, May 30, 2011, Eric O LEBIGOT (EOL) <eric.lebi...@normalesup.org> wrote: > > > Benjamin Root-2 wrote: >> >> On Monday, May 30, 2011, Eric O LEBIGOT (EOL) >> <eric.lebi...@normalesup.org> wrote: >>> >>> Benjamin Root-2 wrote: >>> So, if anything is drawn when interactive mode is off, does one *have* to >>> use show() at the end? in other words does using a single raw_input() at >>> the end of the program force the use of the interactive mode for *all* >>> figures? (Closing all the figures with a simple "enter" is very >>> convenient, >>> but having a performance penalty for this would not be so nice…). >>> >> >> Yes, if interactive mode is off, and you want to view the figures, you >> need show(). No, the raw_input does nothing in either case. >> >>> Now, if I understand you correctly, I have another question. I don't >>> understand anymore what draw() does: in fact, it is not necessary in >>> interactive mode, and it does not appear to do anything in >>> non-interactive >>> mode, since show() is really the function that really displays the >>> figures. >>> So, why does matplotlib offer draw()? what does it really do? >>> >> >> The draw() command is used for some more advanced features such as >> animations and widgets, as well as for internal use. I rarely use >> draw() in my scripts. >> > Thank you for the follow up. > > I wish that Matplotlib provided a mechanism for bypassing show(), because > show() is actually not my friend. :-) In fact, with show(), I hate having > to close one by one each of the 12 figures that my script creates each time > I run it. > > The Matplotlib documentation indeed lists many ways to use Matplotlib. > However, I was trying to get beyond "recipes" and to get a deeper > understanding of what Matplotlib does, so as to avoid wasting too much time > when trying to do something that is not in one of those recipes. Like > stopping a program that was fully or partially in run in non-interactive > mode, without having to use this dreaded show()… > > Thank you again for your input. It is good to know the limitations of > Matplotlib. Maybe it is time to suggest the feature I mentioned to the dev > list??
I am not sure exactly what feature you are asking for. If you are in interactive mode, you could setup a key binding to call a function to close all figures. Another route to go is to take advantage of subplots and reduce the number of figures you need to have. Also, it bares repeating. You may be experiencing some bugs with interactive mode in v1.0.0. Some very important bugfixes were made wrt interactive mode for the v1.0.1 release. I know the sourceforge page still points to v1.0.0, that is a problem that I hope to have fixed later in the next few days. Ben Root > -- > View this message in context: > http://old.nabble.com/Exact-semantics-of-ion%28%29---tp31728909p31734191.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > vRanger cuts backup time in half-while increasing security. > With the market-leading solution for virtual backup and recovery, > you get blazing-fast, flexible, and affordable data protection. > Download your free trial now. > http://p.sf.net/sfu/quest-d2dcopy1 > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users