summaryrefslogtreecommitdiff
path: root/t/lines_9.t
blob: 126fdd05426a1009b45e1d017ee1ce85b22a0020 (plain)
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
#!/usr/bin/perl -w

BEGIN { unshift @INC, 'lib', '../lib'}
use Chart::Lines;
use Chart::LinesPoints;
use strict;
use File::Temp 0.19;
my $samples = File::Temp->newdir();
my $g;

print "1..1\n";

my @labels = ( [ 'Jan', 'Feb', 'Mar' ], [ '0', '20', '100' ] );

$g = Chart::Lines->new;
$g->add_dataset( 10, 20, 30, 40,  50,  60 );
$g->add_dataset( 10, 40, 70, 100, 130, 10 );

$g->set( 'title'        => "Basic example for Option xlabels" );
$g->set( 'y_grid_lines' => 'true' );
$g->set( 'legend'       => 'none' );
$g->set( 'xy_plot'      => 1 );
$g->set( 'x_ticks'      => 'vertical' );

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

$g = Chart::Lines->new;
$g->add_dataset( 10, 20, 30, 40,  50,  60 );
$g->add_dataset( 10, 40, 70, 100, 130, 10 );

$g->set( 'title'        => "Example B for Option xlabels" );
$g->set( 'y_grid_lines' => 'true' );
$g->set( 'legend'       => 'none' );
$g->set( 'xy_plot'      => 1 );
$g->set( 'x_ticks'      => 'vertical' );

$g->set(
    xlabels => \@labels,
    xrange  => [ 0, 100 ]
);
$g->png("$samples/lines_9b.png");

print "ok 1\n";

exit(0);