On Thu, Jan 15, 2009 at 10:13 PM, Raymond Wan <r...@kuicr.kyoto-u.ac.jp> wrote: > > Hi Danny,
Howdy. > 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. Sorry, that was a bit confusing. Using your age example I am trying to color the data for the 0-15, 16-21 and 30 and up ages black, but color the 22-30 year age data red. So, the x-axis data is of the same scale, I'm just trying to figure out how to separate it visually. I guess the @xdata1 would be something like ["0-15", "16-21", "30+"] and @xdata2 is ["22-30"]. I can combine them into one array and pass it into GD::Graph just fine, but I can't get the color delineation. Thanks in advance, Danny -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/