mcc_anand has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl5-new -w use strict; use GD::Graph::bars; use CGI qw (param header); my @data = ( ["Jan-01","Feb-01","Mar-01", "Apr-01","May-01","Jun-01","Jul-01","Au +g-01","Sep -01"],[21,25,33,39,49,48,40,45,15]); my $graph = new GD::Graph::bars; $graph->set( x_label => 'Anand', y_label => 'Praveen', title => 'Testing the Graph display', bar_spacing => 10 ) or warn $graph->error; open PNG, ">/kbase/anand/search/sw/cposupport/search/graph2.png"; binmode PNG; print PNG $graph->plot(\@data)->png; close PNG; print header; print "<HTML><BODY BGCOLOR=white>\n"; print "<IMG SRC=\"/kbase/anand/search/sw/cposupport/search/graph2. +png\">"; print "</BODY></HTML>";
Edit: Added <code> tags, and some formatting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Displaying Images
by steves (Curate) on Feb 10, 2003 at 11:37 UTC | |
by mcc_anand (Initiate) on Feb 10, 2003 at 11:43 UTC | |
by steves (Curate) on Feb 10, 2003 at 11:56 UTC | |
|
Re: Displaying Images
by PodMaster (Abbot) on Feb 10, 2003 at 11:23 UTC |