line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
2124
|
use GD::Graph::bars; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use GD::Graph::hbars; |
3
|
|
|
|
|
|
|
require 'save.pl'; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
my @data = ( |
6
|
|
|
|
|
|
|
["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], |
7
|
|
|
|
|
|
|
[ 11, 12, 15, 16, 3, 1.5, 1, 3, 4], |
8
|
|
|
|
|
|
|
[ 5, 12, 24, 15, 19, 8, 6, 15, 21], |
9
|
|
|
|
|
|
|
[ 12, 3, 1, 5, 12, 9, 16, 25, 11], |
10
|
|
|
|
|
|
|
); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my @names = qw/sample15 sample15-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 => 'Stacked Bars (incremental)', |
23
|
|
|
|
|
|
|
#y_max_value => 50, |
24
|
|
|
|
|
|
|
#y_tick_number => 10, |
25
|
|
|
|
|
|
|
#y_label_skip => 2, |
26
|
|
|
|
|
|
|
cumulate => 2, |
27
|
|
|
|
|
|
|
borderclrs => $my_graph->{dclrs}, |
28
|
|
|
|
|
|
|
#cycle_clrs => 2, |
29
|
|
|
|
|
|
|
bar_spacing => 4, |
30
|
|
|
|
|
|
|
#shadow_depth => 4, |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
transparent => 0, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$my_graph->set_legend( qw(offset increment more)); |
36
|
|
|
|
|
|
|
$my_graph->plot(\@data); |
37
|
|
|
|
|
|
|
save_chart($my_graph, $name); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |