File: composite.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-- 747 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::Composite;

print "1..1\n";

$g = Chart::Composite->new();

$g->add_dataset ('foo', 'bar', 'junk','whee');
$g->add_dataset (3, 4, 9,10);
$g->add_dataset (8, 6, 1,11);
$g->add_dataset (5, 7, 2,12);
$g->add_dataset (2, 5, 7,2);


$g->set ('legend' => 'left');
$g->set ('title' => 'Composite Chart',
	 'composite_info' => [ ['Bars', [1,2]],
	 		       ['LinesPoints', [3,4]] ]);

$g->set ('y_label' => 'y label 1', 'y_label2' => 'y label 2');
$g->set ('colors' => {'y_label' => [0,0,255], y_label2 => [0,255,0], 
	'dataset0' => [0,127,0], 'dataset1' => [0,0,127], 'dataset8', => [0,255,0],
        'dataset9' => [ 255,0,0 ] });
$g->set('brush_size2' => 1);
$g->png("samples/composite.png");

print "ok 1\n";

exit(0);