Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
X Y 1 10 2 20 3 30 ETC
i dont think i am using the array correctly though? Any suggestions would be greatopen (FH, "<data.txt"); while (<FH>) { chomp ($_); ($x, $y) = split (/\s+/, $_) unless /RT/; push @array, ($x, $y); } my $mygraph = GD::Graph::lines->new(600, 300); $mygraph->set( x_label => 'RT', y_label => 'HEIGHT', title => 'xxx' ); $image = $mygraph->plot(\@array) or die $mygraph->error; open(IMG, '>file2.png') or die $!; binmode IMG; print IMG $image->png; close IMG;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: line graph GD::GRAPH
by ishnid (Monk) on May 19, 2005 at 16:06 UTC | |
|
Re: line graph GD::GRAPH
by ikegami (Patriarch) on May 19, 2005 at 16:07 UTC | |
by ishnid (Monk) on May 19, 2005 at 16:14 UTC | |
by ikegami (Patriarch) on May 19, 2005 at 16:26 UTC |