Hi,
I can't seemed use different colors for each bar. Instead of different colors
according to @datacolor, only blue is printed for all the bars. Can you tell me
what's wrong with this code? And, wanting to delete a file that contains the
following graph (to avoid accumulation), what can I use? unlink doesn't seem to do
anything. (@A, @B, and @datacolors have same number; @A contain letters.)
TIA
Angela
******calculation codes
my @datacolors = qw(
blue green cyan blue green cyan blue green cyan blue green cyan
blue green cyan blue green cyan blue green cyan blue green cyan
blue green cyan blue green cyan blue green cyan blue green cyan
blue green cyan blue green cyan blue green cyan blue green cyan
blue green cyan blue green cyan blue green cyan blue green cyan
blue green cyan blue);
my @data = ([EMAIL PROTECTED],[EMAIL PROTECTED]);
my $graph = GD::Graph::hbars->new(950, 800);
$graph->set(
x_label => 'A',
y_label => 'B',
title => 'A for B',
dclrs => [ @datacolors ]
);
my $format = $graph->export_format;
open(IMG, ">../html/tmp/temp.png");
binmode IMG;
my $gd = $graph->plot([EMAIL PROTECTED]);
print IMG $gd->png;
close IMG;
print '<img src="../tmp/temp.png">';
print "</BODY></HTML>";
#unlink "../tmp/temp.png";
---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search