File: lines_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 (31 lines) | stat: -rw-r--r-- 786 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
#!/usr/bin/perl -w

use Chart::Lines;
use strict;
my $g;

print "1..1\n";

$g = Chart::Lines->new(600,400);
$g->add_dataset ('foo', 'bar', 'whee', 'ding','bat', 'bit');
$g->add_dataset (3.2, 4.34, 9.456, 10.459, 11.24234, 14.0234);
$g->add_dataset (-1.3, 8.4, 5.34, 3.234, 4.33, 13.09);
$g->add_dataset (5, 7, 2, 10, 12, 2.3445);


$g->set ('title' => 'LINES');
$g->set ('sub_title' => 'Lines Chart');
$g->set ('colors' => {'y_label' => [0,0,255], y_label2 => [0,255,0], 
	'y_grid_lines' => [127,127,0], 'dataset0' => [127,0,0],
	'dataset1' => [0,127,0], 'dataset2' => [0,0,127]});
$g->set ('y_label' => 'y label 1');
$g->set ('y_label2' => 'y label 2');
$g->set ('y_grid_lines' => 'true');
$g->set ('legend' => 'bottom');

$g->png ("samples/lines_1.png");

print "ok 1\n";

exit (0);