File: bars_3.t

package info (click to toggle)
libchart-perl 2.4.10ds1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,900 kB
  • ctags: 245
  • sloc: perl: 11,697; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 825 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
#!/usr/bin/perl -w

use Chart::Bars;
print "1..1\n";
$g = Chart::Bars->new( 500, 500 );

$g->add_dataset( 'Reds', 'Blacks', 'Greens', 'Yellows', 'Browns', 'Others' );
$g->add_dataset( -2.4,   3.4,      1.9,      1.2,       -1.1,     -2.9 );

%hash = (
    'title'           => 'Selection 2002:\nWins and Losses in percent',
    'text_space'      => 5,
    'y_grid_lines'    => 'true',
    'grey_background' => 'false',
    'legend'          => 'none',
    'min_val'         => -4,
    'max_val'         => 4,
    'min_y_ticks'     => 10,
    'y_axes'          => 'both',
    'spaced_bars'     => 'false',
    'colors'          => {
        'background' => [ 230, 255, 230 ],
        'title'      => 'plum',
        'dataset0'   => 'mauve',
    },
);
$g->set(%hash);

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

print "ok 1\n";

exit(0);