NAME

PDL::Graphics::PGPLOT - PGPLOT enhanced interface for PDL

SYNOPSIS

perldl> $a = pdl [1..100]
perldl> $b = sqrt($a)
perldl> line $b      
perldl> hold
Graphics on HOLD
perldl> $c = sin($a/10)*2 + 4
perldl> line $c     

DESCRIPTION

PDL::Graphics::PGPLOT is an interface to the PGPLOT graphical libraries.

FUNCTIONS

Current display commands:

imag         -  Display an image (uses pgimag()/pggray() as appropriate)
ctab         -  Load an image colour table
line         -  Plot vector as connected points
points       -  Plot vector as points
errb         -  Plot error bars
cont         -  Display image as contour map
bin          -  Plot vector as histogram ( e.g. C<bin(hist($data))> )
hi2d         -  Plot image as 2d histogram (not very good IMHO...)
poly         -  Draw a polygon
vect         -  Display 2 images as a vector field

Device manipulation commands:

hold         -  Hold current plot window range - allows overlays etc.
release      -  Release back to autoscaling of new plot window for each command
rel          -  short alias for 'release'
env          -  Define a plot window, put on 'hold'
dev          -  Explicitly set a new PGPLOT graphics device

The actual PGPLOT module is loaded only when the first of these commands is executed.

Notes: $transform for image/cont etc. is used in the same way as the TR() array in the underlying PGPLOT FORTRAN routine but is, fortunately, zero-offset.

A more detailed listing of the functions and their usage follows.

imag

Display an image (uses pgimag()/pggray() as appropriate)

Usage: imag ( $image,  [$min, $max, $transform] )

Notes: $transform for image/cont etc. is used in the same way as the TR() array in the underlying PGPLOT FORTRAN routine but is, fortunately, zero-offset.

ctab

Load an image colour table

Usage:

ctab ( $name, [$contrast, $brightness] ) # Builtin col table
ctab ( $ctab, [$contrast, $brightness] ) # $ctab is Nx4 array
ctab ( $levels, $red, $green, $blue, [$contrast, $brightness] )

line

Plot vector as connected points

Usage: line ( [$x,] $y )

points

Plot vector as points

Usage: points ( [$x,] $y, [$symbol(s)] )

errb

Plot error bars (using pgerrb())

Usage:

errb ( $y, $yerrors )
errb ( $x, $y, $yerrors )
errb ( $x, $y, $xerrors, $yerrors )
errb ( $x, $y, $xloerr, $xhierr, $yloerr, $yhierr)

cont

Display image as contour map

Usage: cont ( $image,  [$contours, $transform, $misval] )

Notes: $transform for image/cont etc. is used in the same way as the TR() array in the underlying PGPLOT FORTRAN routine but is, fortunately, zero-offset.

bin

Plot vector as histogram ( e.g. bin(hist($data)) )

Usage: bin ( [$x,] $data )

hi2d

Plot image as 2d histogram (not very good IMHO...)

Usage: hi2d ( $image, [$x, $ioff, $bias] )

poly

Draw a polygon

Usage: poly ( $x, $y )

vect

Display 2 images as a vector field

Usage: vect ( $a, $b, [$scale, $pos, $transform, $misval] )

Notes: $transform for image/cont etc. is used in the same way as the TR() array in the underlying PGPLOT FORTRAN routine but is, fortunately, zero-offset.

AUTHOR

Karl Glazebrook [kgb@aaoepp.aao.gov.au], docs mangled by Tuomas J. Lukka (lukka@fas.harvard.edu) and Christian Soeller (csoelle@sghms.ac.uk).

All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file.