- 论坛徽章:
- 0
|
use GD::Graph;
@data = ( [ 1, 2, 3, 4, 5, 6, 7, 8],
[$y1,$y2,$y3,$y4,$y5,$y6,$y7,$y8]
)
<IMG SRC ="plot.pl?data=@data " widht=500 height=250 border=0 />
-----------------------------------------------------------------
在<IMG SRC />处, 将数据@data提供给 plot.pl 去画图.
-----------------------------------------------------------------
plot.pl
----------
use CGI;
use GD::Graph::bars;
@data = CGI->param('data');
print "Content-type: image/png\n\n";
my $chart = GD::Graph::bars->new(700,500);
my $gd_object = $chart->plot(\@data);
binmode STDOUT;
print $gd_object->png;
[ 本帖最后由 w123456 于 2006-1-20 15:06 编辑 ] |
|