On Sun, 25 Dec 2005, S Khadar wrote:

> I am using GD::Graph for developing an online graph - What I need is a 
> (GD::Graphpoints) - Graph - I have already done this and works fine, 
> Now I want to draw a line (best fit straight line / trends line 
> (linear) ) through maximum number of points in this graph and I want 
> to circle them also . So just tell me, is there any way to draw best 
> fit straight line through the maximum number of points on a GD::Graph 
> image.
 
"Best fit line" is mainly a statistical concept, and CPAN has multiple 
modules for dealing with statistics. A search on http://search.cpan.org 
for "best fit" turns up multiple hits, with the first one being the 
documentation for Statistics::LineFit:

http://search.cpan.org/~randerson/Statistics-LineFit/lib/Statistics/LineFit.pm

Using that module or one like it might be able to give you the 
coordinates you need to add to your GD::Graph graph, but sorting out how 
to do this will depend on how your overall code has been written.


-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to