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; }
In reply to Re: Problem passing GD image object
by GrandFather
in thread Problem passing GD image object
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |