Re: [Matplotlib-users] Graphic properties editing
Hi, 2007/6/19, Antoine Sirinelli <[EMAIL PROTECTED]>: > On Tue, Jun 19, 2007 at 02:12:28PM +0200, David Tremouilles wrote: > > Pyplotsuite is another pygtk project using matplotlib. > > It is developed by Antonino Ingargiola. > > http://pyplotsuite.sourceforge.net/ > > Could be maybe interesting to join the effort on providing nice pygtk > > tools for matplotlib sharing common elements of this two projects. > > Just a suggestion... > > Interesting project. Thanks for the link, I didn't know this project. Because has not been announced anywhere yet :D. Antoine, I like the idea of your script. I really would like to see a such thing included in matplotlib eventually. It would help either to quick modify *all* the plot parameters and to have an immediate visual representation of the matplotlib hierarchies. So would help both matplotlib script's users and (matplotlib) programmers as well. As suggestion I think would be useful to divide the properties in three groups: free text, number and list and use for each of then a text entry, a spin button or a combo box. Don't be offended if this is obvious to you :). I've implemented a somewhat similar dialog for Plotfile2 (one of the two scripts composing PyPlotSuite). My dialog although "similar" is more limited in scope. If you are interested you can see the dialog class here (line 566): http://repo.or.cz/w/pyplotsuite.git?a=blob;f=plotfile2.py;h=aa089c3e09957d36396e4f3b97fbfb38d58c44de;hb=HEAD and a screenshot to see how it looks like: http://pyplotsuite.sourceforge.net/images/plotfile2-screenshot2.png I will use your implementation and John Hunter's DialogLineprops as source of inspiration. Thanks... > > I'm very pleased to see there is an active and growing community using > > matplotlib together with pygtk. > > I am using pygtk and matplotlib in my work for building interfaces to > data analysis programs (numpy, scipy and C). I've do this for my own purpose. After a while I decided to publish some of my scripts so PyPlotSuite was born. The purpose is to allow the user to visualize/analyze data without knowing python or matplotlib. Ideally my scripts would be associated to specific file types so that the file manager opens the data with the correct "visualizer" (at least this is how I use them). I'm open in any kind of collaboration, in both senses. I'm just a bit limited in time ATM. Regards, ~ Antonio - 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] Graphic properties editing
Hi, 2007/6/19, John Hunter <[EMAIL PROTECTED]>: > * you may want to look at the line editor dialog in backend_gtk.py for > inspiration. This uses drop down menus for linestyles, color dialog > boxes to pick colors, etc... I'll paste in the code below > > Thanks, > JDH > > class DialogLineprops: Just for the record, I had to explicitly import gtk.glade and to put a self.show() call in the __init__() method to make this work. Nice example though. Thanks :). Regards, ~ Antonio - 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] Documentation for 3D plotting?
I just discovered the 3D plotting functions that matplotlib offers (i.e. Axes3D with plot_surface, etc). This is a great package, but I have not been able to find documentation for some parameters. For example, the plot_surface function appears to take the following arguments: (X, Y, Z, *args, **kwargs) x,y, and z are pretty much self-explanatory, but how do I find out what arguments can be passed to *args and **kwargs? There's no docstring available for these functions. One thing I would really love to be able to do is generate a surface map that is color-coded. Right now I can generate a single-color surface map, but a color-coded surface map would be much easier to interpret. Thanks! Orest - 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] Documentation for 3D plotting?
Unfortunately, the 3D plotting capability is incomplete and mostly unmaintained. Eric Orest Kozyar wrote: > I just discovered the 3D plotting functions that matplotlib offers > (i.e. Axes3D with plot_surface, etc). This is a great package, but I > have not been able to find documentation for some parameters. For > example, the plot_surface function appears to take the following > arguments: > (X, Y, Z, *args, **kwargs) > > x,y, and z are pretty much self-explanatory, but how do I find out > what arguments can be passed to *args and **kwargs? There's no > docstring available for these functions. > > One thing I would really love to be able to do is generate a surface > map that is color-coded. Right now I can generate a single-color > surface map, but a color-coded surface map would be much easier to > interpret. > > Thanks! > Orest > > - > 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
[Matplotlib-users] Loop plotting question
I have a problem where I need to quickly inspect 20-30 plots. I want to open a plotting window, plot the first plot, then hit return to see the nest plot appear in the same window. Below is my script, but it creates a window that has to be closed before it loops over the rest of the plots. How can I avoid that the first plot has to be closed "manually"? Cheers Tommy Note: I know confirm() is overkill, but I just ripped it out of a different program to quickly put this script together :) import pylab from optparse import OptionParser parser = OptionParser(version="%prog 0.01a") parser.add_option("-i","--infile", dest="infname", action="store", help="The input file", metavar="INFILE") parser.add_option("-n","--num", dest="n", action="store",type="int", help="number of files", metavar="N") (options,args) = parser.parse_args() def confirm(_prompt=None, _default=False): """prompts for yes or no response. Return True for yes and False for no.""" promptstr = _prompt if (not promptstr): promptstr = "Confirm" if (_default): prompt = "%s [%s]|%s: " % (promptstr, "y", "n") else: prompt = "%s [%s]|%s: " % (promptstr, "n", "y") while (True): ans = raw_input(prompt) if (not ans): return _default if ((ans != "y") and (ans != "Y") and (ans != "n") and (ans ! = "N")): print "please enter again y or n." continue if ((ans == "y") or (ans == "Y")): return True if ((ans == "n") or (ans == "N")): return False pylab.figure(figsize=(12,14)) for i in xrange(1,options.n+1): t_list = [] a_list = [] e_list = [] i_list = [] q_list = [] Q_list = [] fname = "%s%02i.aei" % (options.infname,i) print fname all_lines = open(fname,"r").readlines() n=0 for lines in all_lines: if n > 3: t_in,a_in,e_in,i_in,peri_in,node_in,M_in,mass = lines.split() t_list.append(float(t_in)) a_list.append(float(a_in)) e_list.append(float(e_in)) i_list.append(float(i_in)) q_list.append(float(float(a_in)*(1. - float(e_in Q_list.append(float(float(a_in)*(1. + float(e_in n+=1 pylab.clf() pylab.subplot(321) pylab.plot(t_list,a_list,'r-') pylab.plot(t_list,Q_list,'b-') pylab.plot(t_list,q_list,'g-') pylab.subplot(322) pylab.plot(t_list,a_list,'r-') pylab.subplot(323) pylab.plot(t_list,Q_list,'b-') pylab.subplot(324) pylab.plot(t_list,q_list,'g-') pylab.subplot(325) pylab.plot(t_list,e_list,'r-') pylab.subplot(326) pylab.plot(t_list,i_list,'r-') #if i == 1: pylab.show() end = confirm("Finished?") - 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