我正在尝试使用GD::Graph创建一个没有轮廓的饼图。令人沮丧的是,我可以用这个来控制轮廓的颜色:
accentclr => 'black',
所以我希望通过这样做完全摆脱大纲:
accentclr => undef,
但是,当我这样做时,轮廓确实会消失,但饼图的其余部分也会显示,只剩下标签!
以下是我的脚本的简化版本:
#!/usr/bin/env perl
use GD::Graph::pie;
# Data to be graphed: 1st array is labels, 2nd array is data
my @data = (
["1st","2nd","3rd","4th"],
[ 1, 3.5, 5, 6 ],
);
my $graph = GD::Graph::pie->new(400, 400);
$graph->set(
# accentclr => undef,
'3d' => 0,
) or die $graph->error;
my $gd = $graph->plot(\@data) or die $graph->error;
open(IMG, '>pie.png') or die $!;
binmode IMG;
print IMG $gd->png;