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??
-- 
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

Reply via email to