The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/perl
use strict;
use warnings;
use lib '/Users/gene/bin/SVG-Graph-Kit/lib';
use SVG::Graph::Kit;
my $x = shift || 20;
my $f = shift || 10;
my $y = 0;
my $d = [];
for( 0 .. $x ) {
    my $j = rand $x;
    $y = $j if $j > $y;
    push @$d, [ $_, $j ];
}
my $g = SVG::Graph::Kit->new(
    _axis => { grid => 1, x => $x, y => $y, s => $f },
    _items => [
        { data => $d,
          line => {
            stroke => 'yellow',
            'stroke-opacity' => 0.3,
            'fill-opacity' => 0.5,
          },
        },
        { data => $d,
          scatter => {
            stroke => 'red',
            'stroke-opacity' => 1,
            'fill-opacity' => 0,
          },
        },
    ],
);
print $g->draw;