in reply to Matrix kind of graph
Making a guess from your data, maybe something like this might work?
#! perl -slw use strict; use GD::Graph::bars; my @data = ( [ qw ( A B C ) ], [ qw ( 100 300 150 ) ], [ qw ( 200 100 100 ) ], ); my $graph = GD::Graph::bars->new(400, 300); $graph->set( show_values => 1, x_label => 'Store', y_label => 'Sales', title => 'Sales/Store/Quarter', y_max_value => 400, y_min_value => 000, y_tick_number => 8, y_label_skip => 1, bargroup_spacing => 10, ) or die $graph->error; $graph->set_legend( qw[ Q1 Q2 ]); my $gd = $graph->plot(\@data) or die $graph->error; open(IMG, '>file.gif') or die $!; binmode IMG; print IMG $gd->gif; close IMG;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Matrix kind of graph
by LanX (Saint) on Feb 24, 2011 at 12:55 UTC |