2012/6/19 Benjamin Root <ben.r...@ou.edu>:
>
>
> On Tue, Jun 19, 2012 at 2:40 PM, Andre' Walker-Loud <walksl...@gmail.com>
> wrote:
>>
>> Hi Goyo,
>>
>> > 2012/6/19 Andre' Walker-Loud <walksl...@gmail.com>:
>> >> But my plots still vanish as soon as the script is done :
>> >
>> > That's to be expected. You can make the script not to end until the
>> > user ask for  it explicitly:
>> >
>> > raw_input('Press <Enter> when you are done')
>>
>> If this is expected - it is a new feature.
>>
>> My understanding was that changing
>>
>> interactive  : True
>>
>> in the matplotlibrc file, then the plots would not vanish until explicitly
>> closed by the user.
>>
>> Is my understanding incorrect?
>>
>>
>> Thanks,
>>
>> Andre
>
>
> 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.

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

Goyo

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