Hi Goyo,

>> That is correct.  If you have a call to show(), then the script should not
>> finish on their own until the windows are closed -- regardless of whether or
>> not "interactive" is True or False.  The "interactive" setting should only
>> dictate whether or not the script execution pauses or not at the call to
>> show().
> 
> Then the script is supposed to keep itself alive, after executing the
> last statment, until the plot windows are closed? Does not work that
> way for me (tkagg, qt4agg and gtk*) and I wouldn't expect that.

Yes, this is how things used to work on my mac (1 week ago).  After upgrade, no 
longer works this way.  Reverting to old compilation - still no longer works.

> BTW this may be better than using raw_input:
> 
> import matplotlib.pyplot as plt
> plt.ion()
> plt.plot([1.6, 2.7])  # The plot windows shows up.
> # Do stuff, even user interaction, more plots, etc.
> # ...
> # Wait until all plot windows are closed.
> plt.ioff()
> plt.show()

This reproduces (as far as I can tell) the exact behavior I used to have.


Interesting to note.  If I have "interactive : True" in my matplotlibrc file, 
and then 

import matplotlib.pyplot as plt
# do everything I used to do
# including call functions that do other plots etc.

plt.ioff()
plt.show()

this also produces the above behavior (what used to work).


So, if I am in interactive mode, then matplotlibrc opens and closes the figures 
for me.  However, if after making all my plots, just before calling plt.show(), 
I turn off interactive mode, then the plots stay open.

This does not follow the logic I would expect - ie interactive means I would 
have to close the figures interactively.  But it gives the behavior I have come 
to expect.


Now back to my other problems (I'll start a new thread).


Cheers,

Andre




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to