File: split_1.t

package info (click to toggle)
libchart-perl 2.4.1-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,804 kB
  • ctags: 370
  • sloc: perl: 9,120; makefile: 532
file content (36 lines) | stat: -rwxr-xr-x 651 bytes parent folder | download | duplicates (2)
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
#!/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);