#!/usr/local/bin/perl # Jaime Prilusky, 2003 use GD::Graph::pie; @data = ( ["1st","2nd","3rd","4th","5th","6th"], [ 4, 2, 3, 4, 3, 3.5] ); $my_graph = new GD::Graph::pie( 200, 200 ); $my_graph->set( start_angle => 90, '3d' => 0, ); my $format = $my_graph->export_format; print "content-type: image/$format\n\n" if ($ENV{REMOTE_ADDR}); binmode STDOUT; print $my_graph->plot(\@data)->$format();