#!/usr/bin/perl -w use GD::Graph::bars; ...get data here... my $mygraph = GD::Graph::bars->new( 600, 350 ); $mygraph->set( dclrs => [qw(green pink blue cyan)] ); $mygraph->set( x_label => 'Section', y_label => 'Satisfaction', title => 'Customer Service By Question', bar_spacing => '5', ) or warn $mygraph->error; my $myimage = $mygraph->plot( \@graph )->png; print "Content-type: image/png\n\n"; print $myimage;