line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
2159
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
2
|
1
|
|
|
1
|
|
42
|
use GD::Graph::lines; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
require 'save.pl'; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
my @data = ( |
6
|
|
|
|
|
|
|
[ "1st", "2nd", "3rd", "4th", "5th" ], |
7
|
|
|
|
|
|
|
[ map { log10($_) } ( 0.01, 0.134, 0.985, 10.2, 98)], |
8
|
|
|
|
|
|
|
[ map { log10($_) } ( 1023, 110, 9.4, 0.1, 0.012)] |
9
|
|
|
|
|
|
|
); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub log10 { return log(shift)/log(10) } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub y_format |
14
|
|
|
|
|
|
|
{ |
15
|
|
|
|
|
|
|
my $value = shift; |
16
|
|
|
|
|
|
|
return sprintf "%g", 10**$value; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $name = 'sample58'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $graph = GD::Graph::lines->new; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
print STDERR "Processing $name\n"; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$graph->set( |
26
|
|
|
|
|
|
|
title => 'Test of axis value transform', |
27
|
|
|
|
|
|
|
y_number_format => \&y_format, |
28
|
|
|
|
|
|
|
y_max_value => log10(1e4), |
29
|
|
|
|
|
|
|
y_min_value => log10(1e-3), |
30
|
|
|
|
|
|
|
y_tick_number => 7, |
31
|
|
|
|
|
|
|
transparent => 0, |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
$graph->plot(\@data); |
35
|
|
|
|
|
|
|
save_chart($graph, $name); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |