出错误了,不知道如何解决??

出错误了,不知道如何解决??

出错误了,不知道如何解决??
麻烦大家帮我看一下,我写了以下代码,但是出现问题了,我不知道是什么原因.
#!/usr/bin/perl
use GD::Graph::lines;
my @data=(
[["12am","2am","4am","6am","8am","10am","12pm","2pm","4pm","6pm","8pm","10pm"],
[0.98,0.63,0.08,0.07,0.12,0.54,0.32,0.89,0.81,0.43,0.21,0.05]]);
my $graph=new GD::Graph::lines();
$graph->set(
x_label=> 'Time',
y_label=>'System Load',
title=>'System Load vs. Time',
y_min_value=>1.1,
y_min_value=>0,
y_tick_number=>6,
box_axis=>1,
line_width=>2,
show_values=>1,
);
$graph->plot(\@data);
open (OUTPUT,">output12.png") or die "Can't open output6.png:$!\n";
binmode OUTPUT;
print OUTPUT $graph->gd->png();
close (OUTPUT);
输出却为:
gd-png: fatal libpng error: Invalid number of colors in palette
gd-png error: setjmp returns error condition
不明白什么原因.
此处有误 [quote]my @data.
相关图像上载:(png 格式, 3 K)


此处有误 [quote]my @data=(
[["12am","2am","4am","6am","8am","10am","12pm","2pm","4pm","6pm","8pm","10pm"],
[0.98,0.63,0.08,0.07,0.12,0.54,0.32,0.89,0.81,0.43,0.21,0.05]]);[/quote]改成[quote]my @data=(
["12am","2am","4am","6am","8am","10am","12pm","2pm","4pm","6pm","8pm","10pm"],
[0.98,0.63,0.08,0.07,0.12,0.54,0.32,0.89,0.81,0.43,0.21,0.05]);[/quote]即可:-)
十分感谢,区长![CCB]1[/CC.
十分感谢,区长![CCB]1[/CCB]