Hi Kåre:

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åre 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 tree
>> 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 get
>> 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 easier
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 to
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
you specified.

(2) Run the PDL examples in the install tree.

cd $prefix/share/plplot5.7.2/examples/
./plplot-test.sh --front-end=perl

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 ones
in x16pdl.ps.

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) to
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.,
http://plplot.sourceforge.net/docbook-manual/plplot-html-5.7.2/plshades.html)
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
__________________________
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
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to