Re: [Matplotlib-users] Multiple plots, interactivity, wx etc
bump .. On Thu, Jul 31, 2008 at 11:02 AM, signal seeker [EMAIL PROTECTED]wrote: Hi, I have couple of applications in which I have to generate multiple plots interactively using the wx backend and wanted to know the best approach to take for this. I did search the list for previous discussions on this subject, but the approach to take is still unfortunately not 100% clear to me. The first use case is that I want to be able to show plots as soon as they are ready. The script sits in a loop pulling out data from different sources, does some transformations and then plots it. Now I understand the recommended way to call show() when all the plots are ready. But since there are many many plots and it take some time to generate one, I would like to show the plot window as soon as it is ready and furthermore I want all the plot windows to be alive so that I can go back and forth through them. I tried using pylab.ion(), but then after the script exits, all the windows disappear along with it. The other use case is more like ipython. I have a program to connect to a database and the user interacts with it using queries. I would like to add visualization support to it The user should be able to plot the data as needed and keep all the plot windows alive. How can I do this using mpl and wx backend? Do you recommend using threading or forking plots as separate processes? Thanks, Suchindra - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Multiple plots, interactivity, wx etc
Hi, I have couple of applications in which I have to generate multiple plots interactively using the wx backend and wanted to know the best approach to take for this. I did search the list for previous discussions on this subject, but the approach to take is still unfortunately not 100% clear to me. The first use case is that I want to be able to show plots as soon as they are ready. The script sits in a loop pulling out data from different sources, does some transformations and then plots it. Now I understand the recommended way to call show() when all the plots are ready. But since there are many many plots and it take some time to generate one, I would like to show the plot window as soon as it is ready and furthermore I want all the plot windows to be alive so that I can go back and forth through them. I tried using pylab.ion(), but then after the script exits, all the windows disappear along with it. The other use case is more like ipython. I have a program to connect to a database and the user interacts with it using queries. I would like to add visualization support to it The user should be able to plot the data as needed and keep all the plot windows alive. How can I do this using mpl and wx backend? Do you recommend using threading or forking plots as separate processes? Thanks, Suchindra - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] spawning plots as separate processes
Bill, Thanks for your reply. pylab(ion) is not what I meant. Consider this simply script - . # simple.py from pylab import * plot([1,2,3]) show() Now, if I do python simple.py on a cmd prompt, this will open up a plot window, but the script won't return until the plot window is closed. I would like simple.py process to end but the plot window to be still up. I have users who would like to type one command after another and not have to close any of the plot windows created. I looked at ezplot, but it looks like a rather heavy weight soln, but maybe I need to do something similar. Is there any other way around this? Thanks, ss On 6/12/07, Bill Baxter [EMAIL PROTECTED] wrote: I'm not sure what you're after exactly, but your design needs may be solved by calling pylab.ion(True). If not the ezplot library that I wrote may do it for you. http://www.python.org/pypi/ezplot/0.1.0a3 --bb On 6/13/07, signal seeker [EMAIL PROTECTED] wrote: Hi All, I am very new to matplotlib and still trying to find my way through docs and api, so please excuse me if there is a simple way to do this. So the situation is this - I would like to write a script that spawns multiple plots and exits, but the plots window do not die until they are explicitly closed. Is there a simple way to do this. All the examples that I have looked at so far have scripts that only exit once the call to show() returns. Is there some mechanism that matplotlib provides to make the show() return? I am of course using the pylab interface now, but I can start using the core matplotlib api if need. Thanks in advance for your time. Regards, -ss - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] spawning plots as separate processes
Bill, The problem is I am writing a bunch of diagonistic tools for users who do not know anything about unix. they just want to type a bunch of commands on a shell and see the plots and they hardly know anything fancy like sending processes to the background :) I guess, I am going to have to use threads or sub processes to spawn new plots. Thanks, ss On 6/13/07, Bill Baxter [EMAIL PROTECTED] wrote: On 6/13/07, signal seeker [EMAIL PROTECTED] wrote: Bill, Thanks for your reply. pylab(ion) is not what I meant. Consider this simply script - . # simple.py from pylab import * plot([1,2,3]) show() Now, if I do python simple.py on a cmd prompt, this will open up a plot window, but the script won't return until the plot window is closed. I would like simple.py process to end but the plot window to be still up. I have users who would like to type one command after another and not have to close any of the plot windows created. I see. In that case, I think you just want $ simple.py on unix and c:\ start python simple.py on Windows. In both cases you can put those commands into a script so the user just types 'run_simple'. --bb - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] spawning plots as separate processes
Hi All, I am very new to matplotlib and still trying to find my way through docs and api, so please excuse me if there is a simple way to do this. So the situation is this - I would like to write a script that spawns multiple plots and exits, but the plots window do not die until they are explicitly closed. Is there a simple way to do this. All the examples that I have looked at so far have scripts that only exit once the call to show() returns. Is there some mechanism that matplotlib provides to make the show() return? I am of course using the pylab interface now, but I can start using the core matplotlib api if need. Thanks in advance for your time. Regards, -ss - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users