pmneve has asked for the wisdom of the Perl Monks concerning the following question:
A dump of %dataarrays shows it to be, apparently, ok. Any suggestions?sub graphtest { $my_graph = new GD::Graph::lines(800, 600); my $data = new GD::Graph::Data( [ @{$dataarrays{'time'}} , @{$dataarrays{'page ins (x1000)'}} # , @{$dataarrays{'cpu system %'}}, ] ); $my_graph->set( x_label => 'Time', # y_label => 'Y label', title => 'Load Analysis '.$store, y_max_value => 100, y_tick_number => 6, y_label_skip => 2, x_label_skip => 20, transparent => 0, ); # $my_graph->set_legend( 'page ins (x1000)' ); $my_graph->plot(\@data); &save_chart($my_graph, $receivedir . 'loadanalysis'); } #----------------------------------------------------- # sub save_chart { my $chart = shift or die "Need a chart!"; my $name = shift or die "Need a name!"; local(*OUT); open(OUT, ">$name.gif") or die "Cannot open $name.gif for write: $!"; binmode OUT; print OUT $chart->gd->gif(); close OUT; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GD Graph: gif comes out a large black rectangle.
by zentara (Cardinal) on May 04, 2005 at 12:25 UTC | |
by pmneve (Novice) on May 04, 2005 at 20:50 UTC | |
by pmneve (Novice) on May 06, 2005 at 00:41 UTC | |
|
Re: GD Graph: gif comes out a large black rectangle.
by 5mi11er (Deacon) on May 04, 2005 at 15:15 UTC | |
|
Re: GD Graph: gif comes out a large black rectangle.
by thcsoft (Monk) on May 04, 2005 at 05:12 UTC | |
by pmneve (Novice) on May 04, 2005 at 20:48 UTC |