in reply to Problem passing GD image object
Your immediate problem is that the line:
$graphimage = $graph->plot(\@data) or die $graph->error;
in sub plot replaces the object you passed in. The easiest way to handle the issue is to simply return the object from plot. You don't need to pass anything in:
my $g = plot (); ... sub plot { my @data = ( ... ) or die $graph->error; return $graph->plot(\@data) or die $graph->error; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem passing GD image object
by cormanaz (Deacon) on Mar 18, 2007 at 00:45 UTC | |
by GrandFather (Saint) on Mar 18, 2007 at 00:49 UTC |