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

DBDGraph Plotter Help Needed !!!

Thread Next
From:
Satyarth Negi
Date:
June 15, 2005 04:41
Subject:
DBDGraph Plotter Help Needed !!!
Message ID:
546a6a00050615044115cac3aa@mail.gmail.com
I running the following script . 
------------------------------------------------------------------------
#!/usr/bin/perl
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' );

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

Regards 
Satyarth Negi 
+91-9899070583

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About