Tree [3fa7de] /

HTTPS access

File Date Author Commit
 t 2004-05-02 Rafael Laboissiere Rafael Laboissiere [5208a8] Re-implemented the plshades interface, which no...
 .cvsignore 2003-04-22 Douglas Burke Douglas Burke [85e874] added files to .cvsignore
 Changes 2003-11-22 Doug Hunt Doug Hunt [8448aa] Updated PLplot interface to perl 5.8.2 and plpl...
 Makefile.PL 2004-03-17 Douglas Burke Douglas Burke [a9dcc9] fix to allow PLplot code to build on OS-X [fink]
 README 2003-03-03 Doug Hunt Doug Hunt [73fa44] Moved PLplot interface to PDL distro. Had been...
 plplot.pd 2004-05-17 Rafael Laboissiere Rafael Laboissiere [3fa7de] Changed the high-level fucntion shadeplot to re...

Read Me


This is a simple perl/PDL interface to the PLplot plotting library.

I wrote this primarily for web graphics as an alternative to PDL::Graphics::PGPLOT.

The advantages of PLplot over PGPLOT are these:

-- It is written all in (generally well structured, comprehensible) C
   (so you don't need a FORTRAN compiler as for PGPLOT).
-- It is in current development
-- It has a simple autoconf installation with built-in PNG support

(The disadvantage is that it is missing some of PGPLOT's many features).

The interface consists of two levels.  A low level interface which maps closely to
the PLplot C interface, and a high level, object-oriented interface which is easier to 


use PDL:
use PDL::Graphics::PLplot;

# Line plot of two 1D PDLs $x and $y
my $pl = PDL::Graphics::PLplot->new (DEV => "png", FILE => "test1.png");
$pl->xyplot($x, $y, PLOTTYPE => 'LINE', COLOR => 'GREEN', 
	            TITLE => 'Sample plot', XLAB => 'frobnitz', YLAB => 'widgets/sec');

# Shade plot of a 2D PDL in $z
my $pl = PDL::Graphics::PLplot->new (DEV => 'png', FILE => "test2.png");
$pl->shadeplot ($z, $nsteps, BOX => [-1, 1, -1, 1], PALETTE => 'RAINBOW');
$pl->colorkey ($z, 'v', VIEWPORT => [0.93, 0.96, 0.15, 0.85]);

For more examples, see the file.


perl 5.6 or higher
PDL 2.3 or more recent
PLplot 5.1.0 (5.2.0 support is in the works...)

Important:  plplot *must* be compiled --with-double so that all floating
  point numbers used are doubles.  Install plplot similar to this:

# ./configure --with-double
# make
# make install

On some systems (IRIX, for one) it may be necessary to compile plplot
without fortran support:  --disable-f77.

Installation should be the normal:
perl Makefile.PL
make test
(as root)
make install
Best of luck!
Doug Hunt
Software Engineer III

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks