use CGI; use strict; use GD::Graph::lines; my @data = ( ["Jan-01","Feb-01","Mar-01", "Apr-01","May-01", "Jun-01","Jul-01","Aug-01","Sep-01"], [21,25,33,39,49,48,40,45,15] ); my $q = CGI->new; my $graph = new GD::Graph::lines; $graph->set( x_label => 'Month', y_label => 'Value', title => 'Test Graph', bar_spacing => 10 ) or warn $graph->error; $graph->plot(\@data) or die $graph->error; print $q->header(-type=>'image/jpeg'),$graph->gd->jpeg(100);