PDL::Graphics::PGPLOT - PGPLOT enhanced interface for PDL
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
PDL::Graphics::PGPLOT is an interface to the PGPLOT graphical libraries.
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.
Display an image (uses pgimag()/pggray() as appropriate)
Usage: imag ( $image, [$min, $max, $transform] )
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] )
Plot vector as connected points
Usage: line ( [$x,] $y )
Plot vector as points
Usage: points ( [$x,] $y, [$symbol(s)] )
Plot error bars (using pgerrb())
errb ( $y, $yerrors ) errb ( $x, $y, $yerrors ) errb ( $x, $y, $xerrors, $yerrors ) errb ( $x, $y, $xloerr, $xhierr, $yloerr, $yhierr)
Display image as contour map
Usage: cont ( $image, [$contours, $transform, $misval] )
Plot vector as histogram ( e.g. bin(hist($data)) )
bin(hist($data))
Usage: bin ( [$x,] $data )
Plot image as 2d histogram (not very good IMHO...)
Usage: hi2d ( $image, [$x, $ioff, $bias] )
Draw a polygon
Usage: poly ( $x, $y )
Display 2 images as a vector field
Usage: vect ( $a, $b, [$scale, $pos, $transform, $misval] )
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.
To install StrHandle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm StrHandle
CPAN shell
perl -MCPAN -e shell install StrHandle
For more information on module installation, please visit the detailed CPAN module installation guide.