From: Rafael L. <lab...@ps...> - 2003-02-23 17:05:31
|
As you probably remember, Doug Hunt has develop the great PLplot bindings for PDL (Perl Data Language, see http://pdl.perl.org). In his package, there is also a object oriented module called PLplotOO: http://search.cpan.org/author/DHUNT/PDL-Graphics-PLplot-0.18/PLplotOO.pm It will be great to see this page: http://pdl.perl.org/demos/plot2D_en.html with PGPLOT replaced by PLplot! PLplotOO was writen for PLplot 5.1.0, but I succeeded to patch it for the current CVS sources. I will completely abandon the Perl5 bindings project that is currently in CVS. Doug's approach is far superior than mine and has the big advantage of being PDL-native. As a matter of fact, instead of the arcane SWIG interface that I developped for the Perl5 bindings, the PDL bindings use a PDL-specific interface based on a *.pd file. Much cleaner, much better. I will eventually package the PDL bindings for Debian, so that the PLplot suite will be complete for at least one Operational System in the Universe. Now, Doug told me that a forthcoming version of the PLplotOO module will need a feature that is present in his patched sources of PLplot: a new driver called "mem", which plots into a user-supplied memory space (X, Y, <R,G,B>). He send to me the source file mem.c and I integrated it into PLplot's source and configuration system. The only caveat is that this new driver needs the addition of a function to the API (in src/plcore.c), called plsmem: /* Set the memory area to be plotted (with the 'mem'driver) as the 'dev' member of the stream structure. Also set the number of pixels in the memory passed in in 'plotmem'. Plotmem is a block of memory maxy by maxx by 3 bytes long, say: 480 x 640 x 3 (Y, X, RGB) This memory will be freed by the user! */ void c_plsmem(PLINT maxx, PLINT maxy, void *plotmem) { plsc->dev = plotmem; plP_setphy (0, maxx, 0, maxy); } I have already a version here ready for cvs commit, including the addition of the documentation for plsmem in doc/docbook/api.xml. However, since this adds things to the API (notice that this does _not_ make the library backwards incompatible), I decided to ask your opinion before I do the actual commit. I do not see problems with the changes, besides the fact that a new API function is totally specific to the mem driver. If you do not care, or if you are silent (I promise to wait for a couple of hours, at least :-) I will cvs commit the changes. -- Rafael |
From: Joao C. <jc...@fe...> - 2003-02-23 17:27:49
|
On Sunday 23 February 2003 16:52, Rafael Laboissiere wrote: > As you probably remember, Doug Hunt has develop the great PLplot bindin= gs > for PDL (Perl Data Language, see http://pdl.perl.org). In his package, > there is also a object oriented module called PLplotOO: > > =20 > http://search.cpan.org/author/DHUNT/PDL-Graphics-PLplot-0.18/PLplotOO.p= m > > It will be great to see this page: > > http://pdl.perl.org/demos/plot2D_en.html > > with PGPLOT replaced by PLplot! > > PLplotOO was writen for PLplot 5.1.0, but I succeeded to patch it for t= he > current CVS sources. > > I will completely abandon the Perl5 bindings project that is currently = in > CVS. Doug's approach is far superior than mine and has the big advanta= ge > of being PDL-native. As a matter of fact, instead of the arcane SWIG > interface that I developped for the Perl5 bindings, the PDL bindings us= e a > PDL-specific interface based on a *.pd file. Much cleaner, much better= =2E > > I will eventually package the PDL bindings for Debian, so that the PLpl= ot > suite will be complete for at least one Operational System in the Unive= rse. > > Now, Doug told me that a forthcoming version of the PLplotOO module wil= l > need a feature that is present in his patched sources of PLplot: a new > driver called "mem", which plots into a user-supplied memory space (X, = Y, > <R,G,B>). > > He send to me the source file mem.c and I integrated it into PLplot's > source and configuration system. The only caveat is that this new driv= er > needs the addition of a function to the API (in src/plcore.c), called > plsmem: > > /* > Set the memory area to be plotted (with the 'mem'driver) as the '= dev' > member of the stream structure. Also set the number > of pixels in the memory passed in in 'plotmem'. > Plotmem is a block of memory maxy by maxx by 3 bytes long, say: > 480 x 640 x 3 (Y, X, RGB) > > This memory will be freed by the user! > */ > > void > c_plsmem(PLINT maxx, PLINT maxy, void *plotmem) > { > plsc->dev =3D plotmem; > plP_setphy (0, maxx, 0, maxy); > } > > I have already a version here ready for cvs commit, including the addit= ion > of the documentation for plsmem in doc/docbook/api.xml. However, since > this adds things to the API (notice that this does _not_ make the libra= ry > backwards incompatible), I decided to ask your opinion before I do the > actual commit. I do not see problems with the changes, besides the fac= t > that a new API function is totally specific to the mem driver. > > If you do not care, or if you are silent (I promise to wait for a coupl= e of > hours, at least :-) I will cvs commit the changes. (Half an hour later...) I see no problem, go ahead. Joao |
From: Alan W. I. <ir...@be...> - 2003-02-23 19:36:54
|
On Sun, 23 Feb 2003, Joao Cardoso wrote: > On Sunday 23 February 2003 16:52, Rafael Laboissiere wrote: > > PLplotOO was writen for PLplot 5.1.0, but I succeeded to patch it for the > > current CVS sources. That sounds like wonderful progress, Rafael. > > [...] > > I will eventually package the PDL bindings for Debian, so that the PLplot > > suite will be complete for at least one Operational System in the Universe. ;-) > > I have already a version here ready for cvs commit, including the addition > > of the documentation for plsmem in doc/docbook/api.xml. > I see no problem, go ahead. > Joao I agree. Go for it! And thanks very much for including the documentation. 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 Canadian Centre for Climate Modelling and Analysis (www.cccma.bc.ec.gc.ca) and the PLplot scientific plotting software package (plplot.org). __________________________ Linux-powered Science __________________________ |