From: Alan W. I. <ir...@be...> - 2003-07-03 13:51:22
|
On Thu, 3 Jul 2003, Thomas J. Duck wrote: > I'm hoping that there are some simple examples out there somewhere. > One key seems to be this plplot_widget module. I would rather not have to > read the sources to try to figure out what's going on, but that may be > necessary. I thought I would ask first. prova.py, qplplot.py, and plplot_widgetmodule.c were put in by me (without looking at them very deeply) at the behest of the ESRF group. For each release I do check that they all work fine by running prova.py (which has impressive speed compared to our other GUI's). plplot_widgetmodule.c is pretty small, and for each of the 3 defined functions most of it is just standard boiler plate code to interface python to C so I don't think you should have much trouble understanding it. For example, look for PyArg_ParseTuple to see what the python argument lists are for each function. Sorry there is no other documentation than the source code at this time for prova.py, qplplot.py, and plplot_widgetmodule.c. The guy who knows most about them is Alessandro Mirone (of ESRF). > > Perhaps building a gtk/glade interface for plplot programs > is possible, but nobody has worked it out yet. In that case, I can give > it a try, although it will probably take me some time. Let me know what > you think. You can use the gnome device (or any other device) with pythondemos.py. My knowledge of GUI's is pretty limited, but my understanding is that the gnome device is the start of a gtk-based GUI for PLplot. It is Rafael Laboissiere's code, but he hasn't had any time to work on it much so the gnome device driver is still immature (most examples work using the -dev gnome option, but a few still segfault, and the GUI functionality is still limited). Nevertheless, the approach used for the gnome device may help you to get started in building a full-blown gtk/glade interface to plplot. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the PLplot scientific plotting software package (plplot.org), the Yorick front-end to PLplot (yplot.sf.net), and the Loads of Linux Links project (loll.sf.net). __________________________ Linux-powered Science __________________________ |