develooper Front page | perl.cpan.interface | Postings from June 2005

DBDGraph Plotter Help Needed !!!

Thread Next
Satyarth Negi
June 15, 2005 04:41
DBDGraph Plotter Help Needed !!!
Message ID:
I running the following script . 
use lib '/home/satyarth/GD_LIB';
use GD;
use DBD::Chart ;
use DBD::Chart::Plot;
    my $img = DBD::Chart::Plot->new();
    my @xdataset = (1,2,3,4,5,6);
    my @ydataset = (3.2,1.1,5.5,6.2,0,7.9);
    $img->setPoints(\@xdataset, \@ydataset,'blue line');
    $img->setOptions (
        horizMargin => 75,
        vertMargin => 100,
        title => 'My Graph Title',
        xAxisLabel => 'my X label',
        yAxisLabel => 'my Y label' );

    binmode FILE;
   print FILE $img->plot;

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 ? 
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 . 

Satyarth Negi 

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About