File Coverage

samples/sample61.pl
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1 1     1   2761 use GD::Graph::mixed;
  0            
  0            
2             require 'save.pl';
3              
4             print STDERR "Processing sample61 (The error message is intended)\n";
5              
6             my @data = (
7             ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
8             [ 1, 2, 5, 6, 3, 1.5, -1, -3, -4],
9             [ -4, -3, 1, 1, -3, -1.5, -2, -1, 0],
10             [ 9, 8, 9, 8.4, 7.1, 7.5, 8, 3, -3],
11             [ 0.1, 0.2, 0.5, 0.4, 0.3, 0.5, 0.1, 0, 0.4],
12             [ -0.1, 2, 5, 4, -3, 2.5, 3.2, 4, -4],
13             [ -0.1, 2, 5, 4, -3, 2.5, 3.2, 4, -4],
14             );
15              
16             my $my_graph = new GD::Graph::mixed();
17              
18             $my_graph->set(
19             types => [ qw( lines bars points area linespoints wrong_type ) ],
20             default_type => 'points',
21             );
22              
23             $my_graph->set(
24              
25             x_label => 'X Label',
26             y_label => 'Y label',
27             title => 'A Mixed Type Graph',
28              
29             y_max_value => 10,
30             y_min_value => -5,
31             y_tick_number => 3,
32             y_label_skip => 1,
33             x_plot_values => 0,
34             y_plot_values => 0,
35              
36             long_ticks => 1,
37             x_ticks => 0,
38              
39             legend_marker_width => 24,
40             line_width => 3,
41             marker_size => 5,
42              
43             bar_spacing => 8,
44              
45             transparent => 0,
46             );
47              
48             $my_graph->set_legend( qw( one two three four five six ) );
49             $my_graph->plot(\@data) or die $my_graph->error;
50             save_chart($my_graph, 'sample61');
51              
52              
53             1;