1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| #!/usr/bin/perl
use warnings;
use strict;
use GD::Graph::mixed;
my @data = (
[ qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec) ],
[ qw/ 2 5 2 9/], # ligne 1
[ (2, 2, 2, 5, 5, 4.5,1.5, 2, 3, 5, 4, 3)], # ligne 2
);
my $my_graph = new GD::Graph::mixed( 500, 500 );
$my_graph->set(
x_label => 'positions',
y_label => 'valeurs',
title => "Rap. : Evolution du signal des pics uniques au cours du pyroséquençage",
y_max_value => 16,
y_tick_number => 8,
y_label_skip => 2,
types => [ qw( lines lines ) ],
);
$my_graph->set_legend( qw( one two three four ) );
$my_graph->plot(\@data);
open(OUT, ">point.png") or die $!;
binmode OUT;
print OUT $my_graph->gd->png;
close OUT; |
Partager