line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
1461
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
2
|
1
|
|
|
1
|
|
24
|
use GD::Graph::lines; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
require 'save.pl'; |
4
|
|
|
|
|
|
|
use constant PI => 4 * atan2(1,1); |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
print STDERR "Processing sample55\n"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my @x = map {$_ * 3 * PI/100} (0 .. 100); |
9
|
|
|
|
|
|
|
my @y = map sin, @x; |
10
|
|
|
|
|
|
|
my @z = map cos, @x; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my @data = (\@x,\@y,\@z); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $my_graph = new GD::Graph::lines(); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$my_graph->set( |
17
|
|
|
|
|
|
|
x_label => 'Angle (Radians)', |
18
|
|
|
|
|
|
|
y_label => 'Trig Function Value', |
19
|
|
|
|
|
|
|
x_tick_number => 'auto', |
20
|
|
|
|
|
|
|
y_tick_number => 'auto', |
21
|
|
|
|
|
|
|
title => 'Sine and Cosine', |
22
|
|
|
|
|
|
|
line_width => 1, |
23
|
|
|
|
|
|
|
x_label_position => 1/2, |
24
|
|
|
|
|
|
|
r_margin => 15, |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
transparent => 0, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$my_graph->set_legend('Thanks to Scott Prahl'); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
$my_graph->plot(\@data); |
32
|
|
|
|
|
|
|
save_chart($my_graph, 'sample55'); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |