Perl Programming Course for Bioinformatics and Internet
2D graphs
sample code


   use GD::Graph::lines; # also "points","linespoints","bars","hbars","area"
   my @data = (
      ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
      [ 1203,  3500,  3973,  2859,  3012,  3423,  1230]
   );
   my $graph = new GD::Graph::lines( 400, 300 );
   $graph->set(
           x_label           => 'Day of the week',
           y_label           => 'Number of hits',
           title             => 'Daily Summary of Web Site',
   );
   my $gd = $graph->plot( \@data );


GD::Graph::lines

GD::Graph::points

GD::Graph::linespoints

GD::Graph::bars

GD::Graph::hbars

GD::Graph::area


Table of contents
Previous | Next