line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#adapted from the bug report submission (RT Bug 1363) by Paul Russell
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2035
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
4
|
1
|
|
|
1
|
|
23
|
use GD::Graph::mixed;
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
require "save.pl";
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
## define your data set
|
8
|
|
|
|
|
|
|
my @data = (
|
9
|
|
|
|
|
|
|
["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
|
10
|
|
|
|
|
|
|
[ 1, 2, 5, 6, 7, 8, 9, 10, 11],
|
11
|
|
|
|
|
|
|
[ 2, 2, 1, 1, 3, 2, 2, 4, 0],
|
12
|
|
|
|
|
|
|
[ 9, 8, 9, 5, 7, 7, 8, 3, 3],
|
13
|
|
|
|
|
|
|
);
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
print STDERR "Processing sample64\n";
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $my_graph = new GD::Graph::mixed();
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$my_graph->set(
|
20
|
|
|
|
|
|
|
types => [ qw( lines) ],
|
21
|
|
|
|
|
|
|
default_type => 'bars',
|
22
|
|
|
|
|
|
|
);
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$my_graph->set(
|
25
|
|
|
|
|
|
|
x_label => 'X Label',
|
26
|
|
|
|
|
|
|
y_label => 'Y label',
|
27
|
|
|
|
|
|
|
title => 'A Mixed Type Graph',
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
y1_max_value => 40,
|
30
|
|
|
|
|
|
|
y2_max_value => 8,
|
31
|
|
|
|
|
|
|
y_min_value => 0,
|
32
|
|
|
|
|
|
|
y_tick_number => 8,
|
33
|
|
|
|
|
|
|
y_label_skip => 1,
|
34
|
|
|
|
|
|
|
x_plot_values => 0,
|
35
|
|
|
|
|
|
|
y_plot_values => 0,
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
long_ticks => 1,
|
38
|
|
|
|
|
|
|
x_ticks => 0,
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
legend_marker_width => 24,
|
41
|
|
|
|
|
|
|
line_width => 3,
|
42
|
|
|
|
|
|
|
marker_size => 5,
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# bar_width => 4, # this appears to be an interesting test case--skipping for now.
|
45
|
|
|
|
|
|
|
#bar_spacing => 1,
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
transparent => 0,
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
values_vertical => 1,
|
51
|
|
|
|
|
|
|
values_format => "%4.1f",
|
52
|
|
|
|
|
|
|
x_label_position => 1/2,
|
53
|
|
|
|
|
|
|
cumulate => 0,
|
54
|
|
|
|
|
|
|
overwrite => 0,
|
55
|
|
|
|
|
|
|
);
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
$my_graph->set_legend( qw( incomming outgoing total ) );
|
60
|
|
|
|
|
|
|
$my_graph->plot(\@data) or die $my_graph->error;
|
61
|
|
|
|
|
|
|
save_chart($my_graph, 'sample64');
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |