line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
2393
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
2
|
1
|
|
|
1
|
|
33
|
use GD::Graph::bars; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use GD::Graph::hbars; |
4
|
|
|
|
|
|
|
require 'save.pl'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my @data = ( |
7
|
|
|
|
|
|
|
["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], |
8
|
|
|
|
|
|
|
[ 5, 12, 24, 33, 19, 8, 6, 15, 21], |
9
|
|
|
|
|
|
|
[ 1, 2, 5, 6, 3, 1.5, 1, 3, 4], |
10
|
|
|
|
|
|
|
); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my @names = qw/sample12 sample12-h/; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
for my $my_graph (GD::Graph::bars->new, GD::Graph::hbars->new) |
15
|
|
|
|
|
|
|
{ |
16
|
|
|
|
|
|
|
my $name = shift @names; |
17
|
|
|
|
|
|
|
print STDERR "Processing $name\n"; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$my_graph->set( |
20
|
|
|
|
|
|
|
x_label => 'X Label', |
21
|
|
|
|
|
|
|
y_label => 'Y label', |
22
|
|
|
|
|
|
|
title => 'Two data sets', |
23
|
|
|
|
|
|
|
long_ticks => 1, |
24
|
|
|
|
|
|
|
y_max_value => 40, |
25
|
|
|
|
|
|
|
y_tick_number => 8, |
26
|
|
|
|
|
|
|
y_label_skip => 2, |
27
|
|
|
|
|
|
|
bar_spacing => 3, |
28
|
|
|
|
|
|
|
shadow_depth => 4, |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
accent_treshold => 200, |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
transparent => 0, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$my_graph->set_legend('Data set 1', 'Data set 2'); |
36
|
|
|
|
|
|
|
$my_graph->plot(\@data); |
37
|
|
|
|
|
|
|
save_chart($my_graph, $name); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |