Does any one knw why I get a red and a green bar side-by-side for the same 
value when using GD::Graph::bars? Is there any way to stop thjis behavior? 
I've checked the perldocs on GD::Graph, but can't find anything about it.

Here is the code I am using:

use GD::Graph::bars;
        
# Get a new bar graph object
my $graph = GD::Graph::bars->new(800,600);
        
# Set the graph options
$graph->set(x_label=>'Date',
                   x_label_position=> 1/2,
                   y_label=>'Amount',
                   y_label_position=> 1/2,
                   title=>'IRA Performance',
                   y_max_value=>2000,
                   y_tick_number=>100,
                   y_label_skip=>20);
$graph->set_text_clr('blue');
        
# Plot the data
my $gd = $graph->plot(\@data);
        
# Write the image to a file
open(IMG, '>iraBar.png') or die "Unable to write graoph to file: $!\n";
binmode IMG;
print IMG $gd->png;
        
# Be nice and close the file
close IMG;

Reply via email to