(none) imager-devel
/ help / lists / applications / search /
 

Problems with Imager Imager::Plot on Solaris 8

From: Super-User (
05764@xyz.molar.is)
Date: Mon 14 Oct 2002 - 10:54:30 GMT

  • Next message: Arnar Mar Hrafnkelsson: "Re: Problems with Imager Imager::Plot on Solaris 8"

    Hi!

    I want to use Imager on solaris 8 and at first it seemed to work:

    All tests successful, 109 subtests skipped.
    Files=42, Tests=957, 66 wallclock secs (49.24 cusr + 7.32 csys = 56.56
    CPU)
    \/bin/sh -c true
    No tests defined for Imager::plugins extension.

    but when I had compiled Imager::Plot and made the tests I got the
    following error:

    bash-2.05# make test
    PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
    1..3
    ok 1
    ok 2
    val is not of type Imager::Color at blib/lib/Imager/Plot/DataSet.pm line
    171.
    *** Error code 2
    make: Fatal error: Command failed for target `test_dynamic'

    Anyone got any ideas? Since it fails on the examples I cant just ignore
    it..

    bash-2.05# ./test2.pl
    val is not of type Imager::Color at
    /usr/local/lib/perl5/site_perl/5.8.0/Imager/Plot/DataSet.pm line 171.
    bash-2.05# more test2.pl
    #!/usr/local/bin/perl

          use Imager;
           use Imager::Plot;

           $plot = Imager::Plot->new(Width => 550,
                                   Height => 350,
                                    GlobalFont =>
    '/usr/openwin/lib/X11/fonts/TrueType/Arial.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");



  •