|
From: Thomas J. D. <to...@fi...> - 2003-07-02 16:13:19
|
Hi,
There is an example of how to use plplot with python/qt distributed
with the source. However, the example, prova.py, isn't documented, so it
is really hard to tell what is going on (e.g., there doesn't seem to be
any documentation for plplot_widget etc).
I was hoping to learn from the qt example and then go on to figure
out how to use plplot with python/gtk/glade. Any help or pointers to
documentation on either topic would be very much appreciated.
Please copy all responses to tom...@da....
Thanks,
Tom
--
Thomas J. Duck <to...@fi...>
Department of Physics and Atmospheric Science, Dalhousie University,
Halifax, Nova Scotia, Canada, B3H 3J5.
Tel: (902)494-1456 | Fax: (902)494-5191 | Lab: (902)494-3813
Web: http://aolab.phys.dal.ca/~tomduck/
Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x17D965DB
TENURE-TRACK FACULTY POSITION available in ATMOSPHERIC SCIENCE at
Dalhousie University: See http://www.atm.dal.ca/jobs/
TENURE-TRACK FACULTY POSITIONS in PHYSICS at
Dalhousie University: See http://www.physics.dal.ca/
|
|
From: Alan W. I. <ir...@be...> - 2003-07-02 23:38:03
|
On Wed, 2 Jul 2003, Thomas J. Duck wrote: > Hi, > > There is an example of how to use plplot with python/qt distributed > with the source. However, the example, prova.py, isn't documented, so it > is really hard to tell what is going on (e.g., there doesn't seem to be > any documentation for plplot_widget etc). > > I was hoping to learn from the qt example and then go on to figure > out how to use plplot with python/gtk/glade. Any help or pointers to > documentation on either topic would be very much appreciated. The python interface to the plplot C library is one of our most complete front ends. Thanks to swig essentially all public API of libplplot is available from python (with redundant array dimension information dropped from the argument lists). To look at a large number of examples using our xwin device, simply execute ./pythondemos.py -dev xwin from the *installed* version in $prefix/lib/plplot5.2.1/examples/python. For more details and also comments on running prova.py read the file README.pythondemos in the same directory. That's it for the python documentation as of now, but I hope to extend the python documentation some more before the next release. BTW, prova.py is a simple proof of concept of pyqt and plplot that Alessandro Mirone (of ESRF) donated some time ago to plplot and which he hopes to improve as time permits. For a much more extensive use of pyqt and plplot (very much buried below a higher-level abstraction) that has been developed at ESRF see the pydevt project at http://pydvt.sourceforge.net/. 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 __________________________ |
|
From: Thomas J. D. <to...@fi...> - 2003-07-03 11:18:48
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Thanks, Alan.
I am aware of pythondemos.py, and have used them extensively in
learning plplot. What I'm hoping to do is build a gui around my plplot
program using gtk/glade via python. I have seen hints that this may be
possible -- there is a gnome canvas driver, and prova.py seems to be an
example of how to build a gui using qt. However, I have no idea how to
get a gnome canvas widget from plplot, and there is no internal
documentation to guide me through prova.py.
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.
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.
Cheers,
Tom
- --
On Wed, 2 Jul 2003, Alan W. Irwin wrote:
> On Wed, 2 Jul 2003, Thomas J. Duck wrote:
>
> > Hi,
> >
> > There is an example of how to use plplot with python/qt distributed
> > with the source. However, the example, prova.py, isn't documented, so it
> > is really hard to tell what is going on (e.g., there doesn't seem to be
> > any documentation for plplot_widget etc).
> >
> > I was hoping to learn from the qt example and then go on to figure
> > out how to use plplot with python/gtk/glade. Any help or pointers to
> > documentation on either topic would be very much appreciated.
>
> The python interface to the plplot C library is one of our most complete front
> ends. Thanks to swig essentially all public API of libplplot is available
> from python (with redundant array dimension information dropped from the
> argument lists). To look at a large number of examples using our xwin device,
> simply execute
>
> ./pythondemos.py -dev xwin
>
> from the *installed* version in $prefix/lib/plplot5.2.1/examples/python. For
> more details and also comments on running prova.py read the file
> README.pythondemos in the same directory. That's it for the python
> documentation as of now, but I hope to extend the python documentation some
> more before the next release.
>
> BTW, prova.py is a simple proof of concept of pyqt and plplot that
> Alessandro Mirone (of ESRF) donated some time ago to plplot and which he
> hopes to improve as time permits. For a much more extensive use of pyqt and
> plplot (very much buried below a higher-level abstraction) that has been
> developed at ESRF see the pydevt project at http://pydvt.sourceforge.net/.
>
> 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
> __________________________
>
- --
Thomas J. Duck <to...@fi...>
Department of Physics and Atmospheric Science, Dalhousie University,
Halifax, Nova Scotia, Canada, B3H 3J5.
Tel: (902)494-1456 | Fax: (902)494-5191 | Lab: (902)494-3813
Web: http://aolab.phys.dal.ca/~tomduck/
Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x17D965DB
TENURE-TRACK FACULTY POSITION available in ATMOSPHERIC SCIENCE at
Dalhousie University: See http://www.atm.dal.ca/jobs/
TENURE-TRACK FACULTY POSITIONS in PHYSICS at
Dalhousie University: See http://www.physics.dal.ca/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/BA/RndxDHhfZZdsRAmzxAKCaNO4EjzspxCjpLRm1oJ6/yCwMsgCg1OL/
Eh0+FeaxTwIPAEbM6gRnGoE=
=vr8r
-----END PGP SIGNATURE-----
|
|
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 __________________________ |
|
From: Rafael L. <lab...@ps...> - 2003-07-03 22:52:56
|
* Alan W. Irwin <ir...@be...> [2003-07-03 06:50]: > 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, [...] That's me. > [...] but he hasn't had any time to work on it much [...] That's true. > [...] so the gnome device driver is still immature [...] That's more than true. > [...] (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. The main point of writing a new driver is how to get PLplot internal commands translated into pixels on the media. This is done through the GnomeCanvas object, which is implemented by the gnome driver. What Thomas seems to need is a way to access the GnomeCanvas object as a widget, such that it can embed it into his gtk interface. I had plans for implementing that and it seemed to me some time ago that it was doable. Unfortunately, I had to put this project on hold, but if Thomas is willing to give it a try, I may find some time after August to look at this project again. -- Rafael |
|
From: Thomas J. D. <to...@fi...> - 2003-07-05 00:21:56
|
Hi Alan, Rafael,
On Fri, 4 Jul 2003, Rafael Laboissiere wrote:
>
> What Thomas seems to need is a way to access the GnomeCanvas object as a
> widget, such that it can embed it into his gtk interface. I had plans for
> implementing that and it seemed to me some time ago that it was doable.
> Unfortunately, I had to put this project on hold, but if Thomas is willing
> to give it a try, I may find some time after August to look at this project
> again.
Yes, this is exactly what I mean. This will likely be a new kind of
problem for me, but I can give it a try if I can talk to you, Rafael,
from time to time. I'm wiped out for much of the rest of the summer too,
but will slowly try to work my way through the learning curve.
Thanks for the helpful discussion.
Cheers,
Tom
--
Thomas J. Duck <to...@fi...>
Department of Physics and Atmospheric Science, Dalhousie University,
Halifax, Nova Scotia, Canada, B3H 3J5.
Tel: (902)494-1456 | Fax: (902)494-5191 | Lab: (902)494-3813
Web: http://aolab.phys.dal.ca/~tomduck/
Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x17D965DB
TENURE-TRACK FACULTY POSITION available in ATMOSPHERIC SCIENCE at
Dalhousie University: See http://www.atm.dal.ca/jobs/
TENURE-TRACK FACULTY POSITIONS in PHYSICS at
Dalhousie University: See http://www.physics.dal.ca/
|