DBDGraph Plotter Help Needed !!!
[email protected] (Satyarth Negi) Wed, 15 Jun 2005 17:11:44 +0530
| Newsgroups | perl.cpan.interface |
|---|---|
| Message-ID | <[email protected]> |
I running the following script .=20
------------------------------------------------------------------------
#!/usr/bin/perl
use lib '/home/satyarth/GD_LIB';
use GD;
use DBD::Chart ;
use DBD::Chart::Plot;
=
=20
my $img =3D DBD::Chart::Plot->new();
my @xdataset =3D (1,2,3,4,5,6);
my @ydataset =3D (3.2,1.1,5.5,6.2,0,7.9);
$img->setPoints(\@xdataset, \@ydataset,'blue line');
=
=20
$img->setOptions (
horizMargin =3D> 75,
vertMargin =3D> 100,
title =3D> 'My Graph Title',
xAxisLabel =3D> 'my X label',
yAxisLabel =3D> 'my Y label' );
open(FILE,'>output.gif');
binmode FILE;
print FILE $img->plot;
close(FILE);
---------------------------------------------------------------
When i run the script , file output.gif is created in the directory
but it is empty , doesnt contain anything .
Can you tell me why is this happening ? Where did i go wrong ?=20
Also Im using DBD because i want to draw multiple plots on a single
graph . Is there any better way i can do it ?
Thanks in anticipation .=20
Regards=20
Satyarth Negi=20
+91-9899070583