R
Rose
I'm testing the codes obtained from internet:
use Imager;
use Imager:
lot;
$plot = Imager:
lot->new(Width => 550,
Height => 350,
GlobalFont => 'ImUgly.ttf');
my @X = 0..100;
my @Y = map { sin($_/10) } @X;
my @Z = map { 1+cos($_/10) } @X;
$plot->AddDataSet(X => \@X, Y => \@Z);
$plot->AddDataSet(X => \@X, Y => \@Y,
style=>{marker=>{size => 2,
symbol => 'circle',
color => Imager::Color->new('red'),
},
});
$img = Imager->new(xsize=>600, ysize => 400);
$img->box(filled=>1, color=>'white');
$plot->{'Ylabel'} = 'angst';
$plot->{'Xlabel'} = 'time';
$plot->{'Title'} = 'Quality time';
$plot->Render(Image => $img, Xoff => 40, Yoff => 370);
$img->write(file => "testout.png");
I have already installed Imager module by CPAN.
install Imager
then by
install Color
And when I ran the test.pl by perl test.pl, the following error appears.
What else should I do?
Can't locate Imager/Color.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
Imager.pm line 7.
BEGIN failed--compilation aborted at Imager.pm line 7.
Compilation failed in require at tst.pl line 1.
BEGIN failed--compilation aborted at tst.pl line 1.
use Imager;
use Imager:
$plot = Imager:
Height => 350,
GlobalFont => 'ImUgly.ttf');
my @X = 0..100;
my @Y = map { sin($_/10) } @X;
my @Z = map { 1+cos($_/10) } @X;
$plot->AddDataSet(X => \@X, Y => \@Z);
$plot->AddDataSet(X => \@X, Y => \@Y,
style=>{marker=>{size => 2,
symbol => 'circle',
color => Imager::Color->new('red'),
},
});
$img = Imager->new(xsize=>600, ysize => 400);
$img->box(filled=>1, color=>'white');
$plot->{'Ylabel'} = 'angst';
$plot->{'Xlabel'} = 'time';
$plot->{'Title'} = 'Quality time';
$plot->Render(Image => $img, Xoff => 40, Yoff => 370);
$img->write(file => "testout.png");
I have already installed Imager module by CPAN.
install Imager
then by
install Color
And when I ran the test.pl by perl test.pl, the following error appears.
What else should I do?
Can't locate Imager/Color.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
Imager.pm line 7.
BEGIN failed--compilation aborted at Imager.pm line 7.
Compilation failed in require at tst.pl line 1.
BEGIN failed--compilation aborted at tst.pl line 1.