[Unix-help] Perl Graphics :: Help
Satyarth Negi
satyarth.negi at gmail.com
Fri Jun 17 02:46:10 EDT 2005
Hi All ,
I need to draw multiple annotated plots on a single
graph . I tried few modules but didnt find one which i can use .
Can you suggest me how to solve this problem , which module to use and
a sample script or URL of some online documentation .
Please reply me at satyarth.negi at gmail.com
Iam trying DBD::Chart::Plot module for this , and running the
following script :
----------------------------------------
#!/usr/local/bin/perl
use GD;
use DBD::Chart::Plot ;
my $img = DBD::Chart::Plot->new(400,300);
my @xdataset = (1,2,3,4,5,6);
my @ydataset = (4.3,5.1,1.6,3,11.2,2);
$img->setPoints(\@xdataset, \@ydataset, 'blue line nopoints');
$img->setOptions (
horizMargin => 75,
vertMargin => 100,
title => 'My Graph Title',
xAxisLabel => 'my X label',
yAxisLabel => 'my Y label' );
open (WR,'>plot.png') or die ("Failed to write file: $!");
binmode WR;
print WR $img->plot();
close WR;
---------------------------------------------------
On execution of this script , file "plot.png" is produced but it is empty .
Please guideme through , Im simply stuck with it .
Please reply me at satyart.negi at gmail.com
Thanks and Regards
Satyarth
More information about the Unix-help
mailing list