liquidc00l has asked for the wisdom of the Perl Monks concerning the following question:
TIA,#!/usr/bin/perl use MSGraph qw/gen_graph/; use GD; use DBI; $sql = "select day, count(day) as day_total from tec_event_data where +month='Feb' group by day order by day asc"; $db = DBI->connect('dbi:Oracle:tec.world','tec','tectec') or die "Unab +le to connect: $DBI::errstr"; $sth = $db->prepare( $sql ); $sth->execute; my $graph = new GD::Graph::lines3d( 600, 400 ); $graph->set( x_label => 'Months', y_label => 'Number of Events', title => 'Monthly Events by Day' ); while (@row = $sth->fetchrow_array) { my $gd = $graph->plot( \@row); } my $format = $graph->export_format; open (IMG, ">/usr/tivoli/TSE/httpd/docs/images/test.$format") or die $ +!; binmode IMG; print IMG $gd->$format(); close IMG;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GD Graph Question
by {NULE} (Hermit) on Feb 20, 2002 at 00:13 UTC | |
|
Re: GD Graph Question
by liquidc00l (Novice) on Feb 19, 2002 at 16:05 UTC | |
by liquidc00l (Novice) on Feb 20, 2002 at 17:45 UTC |