今、ちょうど簡単なお仕事でグラフ出さないといけないので、適当に書いてみた。GD::Graph の出力はどう見ても切ない貧弱な表示なので今回は触れない。 #!/usr/bin/perl use utf8; use strict; use warnings; use Carp; use Imager; use Imager::Graph::Pie; my $chart = Imager::Graph::Pie->new; my $font = Imager::Font->new( file => '/path/to/example.ttf', aa => 1 ); $chart->set_style('primary'); $chart->set_font($font); my $img = $chart->draw( width => 500, height => 500, font =>
![Imager::Graph のサンプル - 日向夏特殊応援部隊](https://cdn-ak-scissors.b.st-hatena.com/image/square/63e0303aecfc3cfc45fa0497289c9174a89ffe26/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2FZ%2FZIGOROu%2F20090614%2F20090614231358.png)