- 论坛徽章:
- 0
|
没想出折怎么让条形图就显示在横坐标区间而不是横坐标那个点上。
#!/usr/bin/perl -w
use CGI ':standard';
use GD::Graph::bars;
use strict;
my @data=(['100','200','300'],
[10,15,20]);
my $graph = GD::Graph::bars->new(500,300);
$graph ->set(
x_label =>'x_label ',
y_label =>'y_label ',
title =>'title',
#Draw bars with width 3 pixels
bar_width =>3,
#Seperate the bars with 4 pixels
bar_spacing =>4,
#Show the grid
y_long_ticks =>1,
#y_tick_number =>2,
#Show values on top of each bar
show_values =>1,
transparent => 1,
) or warn $graph->error;
my $myimage = $graph->plot(\@data) or die $graph->error;
print "Contents-type:image/jpeg\n\n";
print $myimage->jpeg;
As the attached screenshot, how to make the bar chart display between 0~100, 100~200, 200~300 but not on middle of 100...
Thanks for any response!
是不是我没讲清楚?
我想要这样的效果图:
[ 本帖最后由 biginner 于 2007-11-15 10:16 编辑 ] |
|