#!/usr/local/bin/perl
print "Content-type: image/png\n\n";
use CGI; use GD::Graph::lines;
@data = (
[ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep" ], [ sort { $b <=> $a } (9, 3, 5, 6, 3, 1.5, -1.5, -2, -3.5)], [4, 3, 5, 6, 3, 1.5, -1, -3, -4], [ sort { $a <=> $b } (9, 3, 5, 6, 3, 1.5, -1.5, -2, -3.5)], [ reverse(9, 3, 5, 6, 3, 1.5, -1.5, -2, -3.5)],
);
$my_graph = new GD::Graph::lines(500,300);
$my_graph->set(
line_types => [ 1, 2, 3, 4 ], line_type_scale => 8, line_width => 3,
);
$my_graph->set_legend( '1', '2', '3', '4' );
open( IMG , " > file.png") || die $!;
binmode IMG; print IMG $my_graph -> plot(\@data) -> png;
close(IMG);
#comment_nospam