Re: [Matplotlib-users] "asynchronous" plots?
John Salvatier writes: > 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? In 2007 Bill Baxter made a package called ezplot that does plots in a separate process via a remote procedure call interface. I don't think the project has been continued since, so it might not be compatible with current matplotlib, but it may be a useful starting point: http://www.billbaxter.com/projects/ezplot/ -- Jouni K. Seppänen http://www.iki.fi/jks -- 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
Re: [Matplotlib-users] "asynchronous" plots?
Thanks! This was helpful. On Mon, Sep 20, 2010 at 5:43 PM, Benjamin Root wrote: > On Mon, Sep 20, 2010 at 5:01 PM, John Salvatier > 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
Re: [Matplotlib-users] "asynchronous" plots?
On Mon, Sep 20, 2010 at 5:01 PM, John Salvatier 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
[Matplotlib-users] "asynchronous" plots?
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 -- 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