The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Imager::Plot - Perl extension for generating 24 or 8 bit plots.

SYNOPSIS

  use Imager;
  use Imager::Plot;

  $plot = Imager::Plot->new(Width  => 400,
                            Height => 300,
                            GlobalFont => 'ImUgly.ttf');

  $plot->AddDataSet(X  => \@X, Y => \@Y);
  $plot->AddDataSet(XY => \@XY,
    style=>{marker=>{size   => 4,
                     symbol => 'circle',
                     color  => NC(0,120,0)
                    },
            line=>{color=>NC(255,0,0)}
           });

  $img = Imager->new(xsize=>600, ysize => 400);
  $img->box(filled=>1, color=>Imager::Color->new(190,220,255));

  $plot->Render(Image => $img, Xoff => 30, Yoff => 340);
  $img->write(file => "testout.png");

DESCRIPTION

*** This module is in development, Don't depend on *** *** your script to work with the next version (or *** *** even this version for that matter. ***

This is a module for generating fancy raster plots in color. The plot is generated in a few phases. First the initial plot object is generated and contains defaults at that point. Then datasets are added with specifications.

Look at the test for more hints on making this work.

AUTHOR

Arnar M. Hrafnkelsson, addi@umich.edu

SEE ALSO Imager, perl(1).