Hi Danny,


Danny Miller wrote:
Hi, I've got two sets of data I'm displaying in a bar graph.  I'd like
to use two different colors for the different data.  I'm not sure how
to do this.

My code looks like:

@xdata1; # bunch of x values
@ydata1; # bunch of corresponding y values

@xdata2; # second set of x values I'd like to plot
@ydata2; # second set of y values


I have to admit that I have never used GD::Graph before.  However, something 
about what you are describing does not seem right.  A bar graph doesn't usually 
have two sets of x-values.  Just to clarify so that maybe someone else can help 
you, is this what you meant.

Suppose you have heights of men and women for a set of age groups:  0-15 years, 16-21 
years, 22-30 years, 30 and up [not to indicate life goes downhill from 30, but just to 
save me typing :-) ].  That means, for both men and women, you have 4 y-values each.  In 
order to compare men and women that are 0-15 years old, their x-values need to be the 
same.  [Actually, in this example, there are 4 bars each, and the x-values could just be 
discrete values like "0, 1, 2, 3".]

Somewhat of a trivial example, but can you change this example to what you are 
trying to do?  I'm just wondering whether or not a bar graph or even two graphs 
in a plot, is the tool you want...

Ray


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to