On 05/30/2011 06:42 AM, Eric O LEBIGOT (EOL) wrote:
>
>
> Benjamin Root-2 wrote:
>>
>> On Monday, May 30, 2011, Eric O LEBIGOT (EOL)
>>> 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.
>>>
>>> (…)
>>> stopping a program that was fully or partially in run in non-interactive
>>> mode, without having to use this dreaded show()…
>>> (…)
>>
>> 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.
>>
> The keybinding idea is interesting, but the goal is to work in
> *non*-interactive mode (for optimization purposes), and the feature I would
> love is simply to be able to display graphs in this mode without using
> show().  Subplots are unfortunately not an option for me, as each of the
> numerous graph must be independent (they are each saved in a specific file).

Is it correct that you want interactive mode, except that you want to 
control when drawing occurs, for purposes of efficiency?  If so, use 
interactive mode, but instead of using the pyplot interface for the 
actual plotting, use the OO interface, and call plt.draw() when you want 
to update a plot.  See
http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related
although this does not give precisely the example to match your case.

Eric

>
>
> Benjamin Root-2 wrote:
>>
>> 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.
>>
> Thanks, I'll definitely check out version 1.0.1.  The feature I wish existed
> is unfortunately relevant to the *non*-interactive mode.
>



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