J
Johh
Hello, the following piece of code keeps telling me that i can't plot
using undefined values but as far as i can tell they are all defined.
Sorry if i'm being stupid but can someone help i could do with getting
the graph module working. Thanks in advance.
#!/usr/local/bin/perl
@1 = (1,2);
@2 = (2,1);
#makes the arrray of array for the graph
@data = (@1, @2);
#drawing graphs test
use GD::Graph:oints;
$graph = GD::Graph:oints->new(400, 300);
$graph->set(
x_label => 'X Label',
y_label => 'Y label',
title => 'Graph Master',
y_max_value => 100,
y_tick_number => 8,
y_label_skip => 2
) or die $my_graph->error;
$gd = $my_graph->plot(\@data) or die $my_graph->error;
open(IMG, '>graph.gif') or die $!;
binmode IMG;
print IMG $gd->png;
using undefined values but as far as i can tell they are all defined.
Sorry if i'm being stupid but can someone help i could do with getting
the graph module working. Thanks in advance.
#!/usr/local/bin/perl
@1 = (1,2);
@2 = (2,1);
#makes the arrray of array for the graph
@data = (@1, @2);
#drawing graphs test
use GD::Graph:oints;
$graph = GD::Graph:oints->new(400, 300);
$graph->set(
x_label => 'X Label',
y_label => 'Y label',
title => 'Graph Master',
y_max_value => 100,
y_tick_number => 8,
y_label_skip => 2
) or die $my_graph->error;
$gd = $my_graph->plot(\@data) or die $my_graph->error;
open(IMG, '>graph.gif') or die $!;
binmode IMG;
print IMG $gd->png;