Thanks! This was helpful.

On Mon, Sep 20, 2010 at 5:43 PM, Benjamin Root <ben.r...@ou.edu> wrote:

> On Mon, Sep 20, 2010 at 5:01 PM, John Salvatier <jsalv...@u.washington.edu
> > wrote:
>
>> Hello,
>>
>> Is there a way to do "asynchronous" plots in matplotlib? By asynchronous I
>> mean plots that simply spawn a new process and do not stop the program while
>> the plot is visible? For example, I would like to be able to run a script
>> that plots something and have the program end with the plot still useable so
>> I can run the script again and generate a slightly different plot that I can
>> compare side by side with the first.
>>
>> John
>>
>>
> John,
>
> matplotlib does have an interactive mode that can be turned on with a call
> to plt.ion().  Note that any figure is spawned as a child thread.  If you
> run a script from the command line, the script won't end until the figure is
> closed (hence you can't start another script).
>
> However, another possible route is to design your code as functions that
> take a figure or axes object, you could then just call the needed functions
> for an existing axes object.
>
> Another possibility (and maybe this is what you meant originally) is to
> have a python or ipython  session open and import the desired scripts in
> order to execute them (with interactive mode turned on).
>
> I hope this is helpful!
> Ben Root
>
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to