http://www.perlmonks.org?node_id=152546


in reply to Flat File Database & GD::Graph (REVISITED)

A Good practice I have found while working with GD Graphs is that when setting a max value for the y-axis, do it with a little more intuitiveness. Useually when building you @yAxis structures, you do it in a loop, like you are. Try adding a little flare. Also While looking at this I am seeing a discrepency in your logic, if I see this correctly you will not be getting the output I suspect you want. With this you will get a graph with just one point. I would expect you when a linespoints graph with all of the data from the flat file plotted. maybe something like this.
my $largestValue = 0; my (@xAxisOfDates,@yAxisOfPartners,@yAxisOfArfi, @data) = (); open(HANDLE,"integrate.dat"); while (<HANDLE>) { chomp; @temp1 = split(/\|/, $_); $domain = unpack ("A5", $temp1[17]); push(@xAxisOfDates, $temp1[1]); push(@yAxisOfPartners, $temp1[4]); push(@yAxisOfArf, $temp1[5]); if ($temp1[4] > $largestValue){ $largetValue = $temp1[4]; } if ($temp1[5] > $largestValue){ $largestValue = $temp1[5]; } } close(HANDLE); @data = (\@xAxisOfDates, \@yAxisOfPartners, \@yAxisOfArf);
and then this in your setup of graph parameters set your y_max_value => $largestValue
Hopefully this helps and I was able to see why you were not getting what you expected with output, if I was offtarget, /tell me in the talk window and I will help, I am pretty knowledgable when it comes to GD applications.

Tradez
"Never underestimate the predicability of stupidity"
- Bullet Tooth Tony, Snatch (2001)