[Gllug] [Fwd: GD::Graph question]
Dean Wilson
dwilson at unixdaemon.net
Sun Nov 12 10:52:28 UTC 2006
On Sun, Nov 12, 2006 at 10:41:40AM +0000, Dean Wilson wrote:
> I've tweaked some chunks of it and this now works. Not sure it does exactly
> what you want but you should be able to replace and test bits at a time
> until it does.
------------------------------------------------
> my $gd = $graph->plot(\@data) or die $graph->error;
> open(IMG, '>file.png') or die $!;
> binmode IMG;
> print IMG $gd->png;
And for CGI use change to
# remove this line
# my $gd = $graph->plot(\@data) or die $graph->error;
binmode STDOUT;
print $graph->plot(\@data)->png();
Sorry, didn't notice you were using it in a CGI.
Dean
--
Dean Wilson http://www.unixdaemon.net
Profanity is the one language all programmers understand
--- Anon
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list