File: bars.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 (49 lines) | stat: -rw-r--r-- 1,128 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
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/perl -w

use Chart::Bars;

print "1..1\n";

$g = Chart::Bars->new(600,600);
$g->add_dataset ('foo', 'bar', 'junk', 'ding', 'bat');
$g->add_dataset (30000, 40000, 80000, 50000, 90000);
$g->add_dataset (80000, 60000, 30000, 30000, 40000);
$g->add_dataset (50000, 70000, 20200, 80000.8, 40000);

%hash = ('transparent' => 'true',
	 'precision' => 1,
	 'title' => 'Bars\nChartmodul',
	 'y_grid_lines' => 'true',
	 'graph_border' => '4',
	 'min_val' => '0',
	 'text_space' => '2',
	 'sub_title' => 'Untertitel',
	 'x_label' => 'X-Achse',  
	 'y_label' => 'Y-Achse',  
	 'y_label2' => 'Y-Achse2',
	 'legend' => 'none',
	 'tick_len' => '3',
	 'x_ticks' => 'vertical',
	 'include_zero' => 'true',
	 'pt_size' => '7',
	 'skip_x_ticks' => '1',
	 'grid_lines' =>'true',
	 'colors' => {
	 	      'text' => [100,0,200],
	 	      'y_label' => [2,255,2],
	 	      'y_label2' => [2,255,2],
		      'y_grid_lines' => 'black',
	 	      'x_grid_lines' => 'black',
	 	      'dataset0' => [255,20,147],
	 	   	 	      
	 	      },
	  'y_ticks' => '20' ,
	 
	 );
$g->set (%hash);

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

print "ok 1\n";

exit (0);