LUTSection: User Contributed Perl Documentation (3)Updated: 2003-11-27 |
LUTSection: User Contributed Perl Documentation (3)Updated: 2003-11-27 |
use PDL::Graphics::PGPLOT; use PDL::Graphics::LUT;
# what tables are available my @tables = lut_names();
# get the reversed colour table 'smooth', # with the gamma intensity ramp my ( $l, $r, $g, $b ) = lut_data( 'smooth', 1, 'gamma' );
# use the table idl5 in ctab
ctab( lut_data('idl5') );
Unlike the initial release of the package, the data tables are now stored within the PDL distribution as FITS files (see $tabledir and $rampdir), rather than in the module itself. Changes to these directories will be picked up on the next call to one of the package functions.
@tables = lut_names();
@ramps = lut_ramps();
( $l, $r, $g, $b ) = lut_data( $table, [ $reverse, [ $ramp ] ] );
Returns the levels and r, g, b components of the colour table $table. If $reverse is 1 (defaults to 0 if not supplied), then the r, g, and b components are reversed before being returned. If not supplied, $ramp defaults to ``ramp'' (this is a linear intensity ramp).
The returned values are piddles containing values in the range 0 to 1 inclusive, and are floats.
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.