use PDL; use PGPLOT; use PDL::Graphics2D; #imports imag2d() and twiddle() use PDL::AutoLoader; our @PDLLIB; push @PDLLIB, '.'; my $winopt = {Device => '/GW', WindowWidth => 7, Aspect => 1}; my $w = PDL::Graphics2D->new('PGPLOT'); $a = sequence(64,48,3); # make test RGB image $a = $a->mv(2,0); # color must be dim(0) with size [0..4] $a /= $a->max; # pixel values in [0.0,1.0] $a = sin(10*$a); imag2d($a);