File Coverage

samples/sample1A.pl
Criterion Covered Total %
statement 4 6 66.6
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 6 8 75.0


line stmt bran cond sub pod time code
1             #!/usr/local/bin/perl
2              
3 1     1   1512 use strict;
  1         1  
  1         27  
4 1     1   26 use GD::Graph::bars;
  0            
  0            
5             use GD::Graph::hbars;
6             require 'save.pl';
7              
8             my @data = (
9             ["1st","2nd","3rd","4th","5th","6th","7th"],
10             [ 5, 12, 24, 33, 19, 18, 6],
11             [ 5, 11, 13, 28, 23, 13, 1],
12             [ 2, 8, 10, 20, 18, 21, 3],
13             [ 10, 20, 19, 36, 23, 19, 11],
14             );
15              
16             my @names = qw/sample1A sample1A-h/;
17             my @dim = (600,400);
18             for my $my_graph (GD::Graph::bars->new(@dim),GD::Graph::hbars->new(@dim))
19             {
20             my $name = shift @names;
21             print STDERR "Processing $name\n";
22              
23             $my_graph->set(
24             x_label => 'X Label',
25             y_label => 'Y label',
26             title => 'Four data sets (with grouping space)',
27             y_max_value => 40,
28             y_tick_number => 8,
29             y_label_skip => 2,
30             bar_spacing => 2,
31             shadow_depth => 3,
32             bargroup_spacing => 4,
33             accent_treshold => 200,
34              
35             transparent => 0,
36             );
37              
38             $my_graph->set_legend(qw(Harry Ron Neville Hermione));
39             $my_graph->plot(\@data);
40             save_chart($my_graph, $name);
41             }
42              
43             1;