line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
2126
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
2
|
1
|
|
|
1
|
|
32
|
use GD::Graph::bars; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use GD::Graph::hbars; |
4
|
|
|
|
|
|
|
require 'save.pl'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# Also see sample63 |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my @data = ( |
9
|
|
|
|
|
|
|
["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], |
10
|
|
|
|
|
|
|
[ 11, 12, 15, 16, 3, 1.5, 1, 3, 4], |
11
|
|
|
|
|
|
|
[ 5, 12, 24, 15, 19, 8, 6, 15, 21], |
12
|
|
|
|
|
|
|
[ 12, 3, 1, 5, 12, 9, 16, 25, 11], |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my @names = qw/sample17 sample17-h/; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
for my $my_graph (GD::Graph::bars->new, GD::Graph::hbars->new) |
18
|
|
|
|
|
|
|
{ |
19
|
|
|
|
|
|
|
my $name = shift @names; |
20
|
|
|
|
|
|
|
print STDERR "Processing $name\n"; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
$my_graph->set( |
23
|
|
|
|
|
|
|
x_label => 'X Label', |
24
|
|
|
|
|
|
|
y_label => 'Y label', |
25
|
|
|
|
|
|
|
title => 'Stacked Bars (incremental)', |
26
|
|
|
|
|
|
|
#y_max_value => 50, |
27
|
|
|
|
|
|
|
#y_tick_number => 10, |
28
|
|
|
|
|
|
|
#y_label_skip => 2, |
29
|
|
|
|
|
|
|
cumulate => 1, |
30
|
|
|
|
|
|
|
dclrs => [ undef, qw(dgreen green) ], |
31
|
|
|
|
|
|
|
borderclrs => [ undef, qw(black black) ], |
32
|
|
|
|
|
|
|
bar_spacing => 4, |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
transparent => 0, |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
$my_graph->set_legend(undef, qw(low high)); |
38
|
|
|
|
|
|
|
$my_graph->plot(\@data) or die $my_graph->error; |
39
|
|
|
|
|
|
|
save_chart($my_graph, $name); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |