Ask a Question related to PERL Modules, Design and Development.
-
carcassone_fr@yahoo.com #1
GD::Graph - how to get rid of leading gap in line graph?
Is there a way to get rid of the leading gap to the left of a line
graph? Therefore, I want the graph line to start on the Y-axis, not
the position of the first X tick. Or, make the first X tick be
located on the Y-axis.
Here is a simple example:
#!/usr/local/bin/perl
use strict;
use GD;
use GD::Graph::lines;
my @months = ( "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" );
my @rainfall = ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 );
my @array = (\@months, \@rainfall);
my $graph = new GD::Graph::lines(768, 896);
$graph->set( y_long_ticks => "1", x_tick_offset => "2" );
my $gd_image = $graph->plot( \@array );
open(IMG, ">./test.png") or die $!;
binmode IMG;
print IMG $gd_image->png;
exit 0;
This graph will have a gap between the Y-axis and the first X tick
"Jan".
Thanks in advance for your help.
carcassone_fr@yahoo.com Guest
-
animated line graph control?
Can anyone tell me what vendor provides an animated line graph control like on farecast.com? Please see the following site and click on the... -
Graph.0.69 Module---how to get a DAG from graph with cycles
Here I use an example to illustrate the problem I met when using Graph Theory Module: I have a directed graph looks like the following (see the... -
Changing size of line graph marks
I have created a line graph with data marks and connecting lines. I would like to change the little boxes to larger, design-based marks. I have the... -
ANNOUNCE: Graph::Timeline and Graph::Timeline::GD 1.0
Graph::Timeline - Render timeline data This document refers to verion 0.1 of Graph::Timeline, released November 11, 2003 This class takes a... -
Web graph ?????
I've a couple of tricks to generate bar charts on the fly, using GD in one instance, and spacer images/TD cells in the other Using GD /...



Reply With Quote

