- 论坛徽章:
- 0
|
我调用如果的代码画图,
sub drawimage{
@data = (\@text,\@x,\@y );
my $graph = new GD::Graph::lines(600, 600);
my $title=shift;
$graph->set(
x_label => 'Time',
y_label => 'Value',
title => $title,
y_max_value => $maxy,
y_tick_number => $#y,
y_label_skip => 10,
x_label_skip =>10,
line_width =>2
) or die $graph->error;
my $gd = $graph->plot(\@data) or die $graph->error;
binmode STDOUT;
print $gd->png();
}
print "Content-type: image/png\n\n";
执行完后,图中显示红线,
知道的DX帮忙一下,GD文档里也没找到相应的信息.谢谢. |
-
test.PNG
(47.05 KB, 下载次数: 22)
执行上面代码得出的图.
|