1.3, TLoDSnake (?), 17:57, 01/09/2004 [ответить] [↓] [п©б╘п▒Б┬≥Б∙≈ п©б╘п▒Б┬≥Б∙≥п©б╘п▒Б┬≥Б∙⌡п©б╘п▒Б┬≥Б∙▓п©б╘п▒Б┬≥я▒я▐Б√░п▒Б√═Б■─п©б╘п▒Б┬≥ц╥я▐Б√░п▒Б√═Б√└п©б╘п▒Б┬≥Б∙⌡я▐Б√░п▒Б√═Б■─я▐Б√░п▒Б√═Б√▒]
| +/– |
use GD;
use GD::Graph;
use GD::Graph::bars;
use Unicode::Map8;
my @data = (
["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
[ 1, 2, 5, 6, 3, 1.5, 1, 3, 4],
[ sort { $a <=> $b } (1, 2, 5, 6, 3, 1.5, 1, 3, 4) ]
);
my $graph = GD::Graph::bars->new(400, 300);
$graph->set_title_font('/data/fonts/arial.ttf', 20);
my $r = Unicode::Map8->new("cp1251");
my $title = $r->to16('Ðóññêèé çàãîëîâîê');
$graph->set(
x_label => 'äíè',
y_label => 'Õèòû',
title => "Ðóññêèé òåêñò $title",
y_max_value => 8,
y_tick_number => 8,
y_label_skip => 2
) or die $graph->error;
my $gd = $graph->plot(\@data) or die $graph->error;
Русского нету (( | |
|