File: split_1.t

package info (click to toggle)
libchart-perl 2.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,896 kB
  • sloc: perl: 11,587; makefile: 569
file content (37 lines) | stat: -rw-r--r-- 610 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl -w

use Chart::Split;
use strict;
print "1..1\n";

my ( $x, $y, @x, @y, %hash );
my $g = Chart::Split->new();

for ( my $i = 0 ; $i < 60 ; $i += .05 )
{
    $y = sin($i);
    $x = $i;
    push @x, $x;
    push @y, $y;
}

$g->add_dataset(@x);
$g->add_dataset(@y);

%hash = (
    'start'          => 0,
    'interval'       => 20,
    'interval_ticks' => 21,
    'brush_size'     => 1,
    'legend'         => 'none',
    'title'          => 'f(x) = sin x',
    'precision'      => 0,
    'y_grid_lines'   => 'true',

);
$g->set(%hash);

$g->png("samples/split_1.png");
print "ok 1\n";

exit(0);