The one 'preliminary' solution I found is using an interactive mode +
raw_input.
Here is and example,

        ion()
        plot([1,2,3,4,5])
        raw_input('Type Enter')
        clf()
        plot([1,2,3,4,5])
        raw_input('Type_Enter')
        clf()
        plot([1,2,3,4,5])
        show()

With this approach, I can press the enter when I want to see next figure.

Though It's not as convenient as 'multiple show()'..


On Wed, Aug 19, 2009 at 1:57 PM, Kim, Dae-Won <dwki...@gmail.com> wrote:

>
>
> On Wed, Aug 19, 2009 at 1:02 PM, Ryan May <rma...@gmail.com> wrote:
>
>> On Wed, Aug 19, 2009 at 11:55 AM, coati <dwki...@gmail.com> wrote:
>>
>>>
>>>  I have a problem with show() command in my macbook machine (Leopard
>>> 10.5.8).
>>> For example, if I run the script shown below
>>> (let assume it is saved as 'test.py', and I run a command 'python
>>> test.py'),
>>>
>>> ---------------------------------------
>>>
>>> plot([1,2,3,4,5])
>>> show() #first window
>>> plot([1,2,3,4,5])
>>> show() #second window
>>> plot([1,2,3,4,5])
>>> show() #third window
>>>
>>> ---------------------------------------
>>>
>>> Then the first window just pops up and I can see a beautiful straight
>>> line
>>> :) No problem so far.
>>> But, after I close the first window by clicking the close button of the
>>> window,
>>> other two window (second and third) just pops up and close themselves
>>> instantly
>>> even though I didn't click the close button...
>>> Also, the second and third plot is shown in the same window.
>>>
>>> I don't have such problem in my Ubuntu machine..
>>>
>>> Does anybody know reasons?
>>
>>
>> show() actually handles starting the GUI mainloop, so you really shouldn't
>> be calling it more than once from a script.  Quite frankly, it's more
>> amazing that it works on your Ubuntu macine. :)  If you're wanting 3
>> separate windows, try:
>>
>> plot([1,2,3,4,5])
>> figure()
>> plot([1,2,3,4,5])
>> figure()
>> plot([1,2,3,4,5])
>> show()
>>
>> Ryan
>>
>> --
>> Ryan May
>> Graduate Research Assistant
>> School of Meteorology
>> University of Oklahoma
>>
>
>
> Thanks Ryan,
>
> Hm.. it's a bit strange.. I just installed matplotlib at Ubuntu using the
> package manager :)
> And, another linux machines (red hat enterprise) can do this too. For the
> RHELs, I compiled matplotlib source code by myself.
>
>
> figure() works very well, but what I want to do is to check the plots one
> by one and thus
> I can exit the script at any time I want (because I usually have lots of
> figures to check and I don't want
> to pop up every of them at the same time..)
>
>
> Anyway, thank you very much!
>
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to