I am going to answer you on list since others may be interested as well
in my response.
On 2007-02-21 09:08+0100 K=E5re Edvardsen wrote:
> Hi Alan,
> Thanx for helping me out! I got all PerlDL examples work perfectly! It
> was of cource me messing up the color maps, but everthing's ok now.
>> You should see postscript files that have been generated in the build tr=
>> test subdirectory as a result of that ctest command. Use a postscript
>> viewer to look at them, (e.g., "gv test/x16pdl.ps"). Hopefully you will=
>> good-looking results that verify that all is well with PDL and the CVS
>> version of PLplot on your platform, and we can take it from there to get
>> equivalent good-looking results for your own pdl examples.
> So then back to my own pdl problem. I just have to admit I can't figure
> out how plshades work based on the examples (and the plplot ref-man is
> not consistent with PDL, I guess...)
> Anyway, as I wrote earlier I have three different arrays, $lon, $lat and
> $value (or one three-column pdl) where I like to shade on basis of
> $value. I spent some time last night figuring out how plshades work, but
> still no success... Are you able to help me out on this one?
Sure, but let's take some additional steps first which should make it easie=
for you to transform one of the PDL examples into what you want.
(1) From your build tree (where you executed the make command and ctest
command) try "make install >& make_install.out" which should install
everything you need in a coherent way at the install prefix you specified t=
the cmake command. Look over make_install.out to make sure there are no
errors, and everything is installed where you expect from the prefix that
(2) Run the PDL examples in the install tree.
The resulting output on my system is the following:
Testing front-end perl
PLplot library version: 5.7.2
perl: relocation error: /usr/lib/perl5/auto/PDL/Graphics/PLplot/PLplot.so:
undefined symbol: plmap
That last error is because my version of pdl does not have a wrapper
implemented for plmap so the resulting x19pdl.ps is zero length, but
all other postscript results are fine on my system including the plshades o=
If you get results similar to above (especially the library version) and
x16pdl.ps looks good, then the next step is to modify perl/x16.pl in that
install tree to define the arrays plotted in the way that you like. Once
that proof-of-concept is working, then you should figure out exactly what
plplot-test.sh and test_perl.sh scripts do (e.g., to set LD_LIBRARY_PATH) t=
set up the PDL examples so that you can set up your own PDL example so that
it works properly with the modern version of PLplot.
BTW, I have little experience with Perl or PDL, but the syntax in x16.pl
looks entirely straightforward. For example, your $lon, $lat, and $value
arrays are the equivalent of $x, $y, and $z. By comparing every PLplot
command in x16.pl with its C documentation (e.g.,
you should quickly be able to infer what the form of every PDL equivalent
PLplot command should be. Note, PDL uses the "redacted" form of API (being
documented as we speak) where all redundant dimensional information is
dropped from commands. (Redundant, because the PDL arrays carry dimension
information along with them, and the PDL interface to PLplot figures that
out and sets up the C call appropriately.)
Let us know how it goes.
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project