CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Graph - bargroup_spacing

 



lineker
New User

Jun 5, 2009, 1:33 PM

Post #1 of 3 (1428 views)
Graph - bargroup_spacing Can't Post

I have a trouble at graph display. I attached my graph. I want to leave space between bargroups. I searched the forums and show the command:

bargroup_spacing

but it does not work. I dont know why. Here my code is:
sub graph {

.......................
my $data = GD::Graph::Data->new([@data]);
use GD::Graph::bars3d;
my $graph = GD::Graph::bars3d->new($width,$height);
my $format = $graph->export_format;
$graph->set_legend_font(gdMediumBoldFont);
$graph->set_legend(map(&make_english($vendors{$_}),@vendors));
my @colors = split /,/, $RS{LINE_COLORS};
$graph->set
(y_max_value => 1.05 * $max,
y_min_value => 0.95 * $min,
y_number_format => "%04.2f",
y_tick_number => 10,
x_label_skip => 0,
y_label_skip => 0,
bar_spacing => 2,
long_ticks => 1,
x_labels_vertical => 1,
transparent => 0,
line_width => 1,
fgclr => '#dddddd',
dclrs => \@colors,
show_values => 1,
values_format => "%4.2f",
l_margin => 20,
b_margin => 10,
r_margin => 5,
t_margin => 10,
bargroup_spacing => 4, (why does not work)
legend_placement => 'RT',
);
print header("image/$format");
binmode STDOUT;
print $graph->plot($data)->$format;
}

I dont think it is because of perl version because use perl 5.0.

I attched picture of graph

Thanks in advance.


(This post was edited by lineker on Jun 14, 2009, 11:39 PM)
Attachments: mail.png (13.0 KB)


scrpnsanctuary
Novice

Jun 10, 2009, 9:39 AM

Post #2 of 3 (1397 views)
Re: [lineker] Graph - bargroup_spacing [In reply to] Can't Post

Honestly, it looks like you are doing it correctly.

http://search.cpan.org/~bwarfield/GDGraph-1.44_01/Graph.pm

Maybe you have an old version of the module that has a bug? Sorry I can't be more help.
----------
The vastness of what we know is only surpassed by the vastness of what we don't.


lineker
New User

Jun 14, 2009, 11:40 PM

Post #3 of 3 (1375 views)
Re: [lineker] Graph - bargroup_spacing [In reply to] Can't Post

Despite I changed Graph.pm with the link you gave, it did not work.

I can not understand what the problem is


(This post was edited by lineker on Jun 14, 2009, 11:41 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives