i already have a graph beautifully drawn out at http://www.maidenerleghweathe

r.com/cetchangegraph.php

i wish to add a simple straight line according to the equation y=mx+b

the values of m and b are found in another file called regression.php and are

known as $m and $b.

as you can see i already have two lines drawn, (red and black) but NOT my

y=mx+b line yet.

how do i do it?

i have left my phplot code alone and added the below code, hoping that it

would superimpose the line????

require ("regression.php"); $m = $result['m']; $b = $result['b']; $data = array(); for ($x = 1; $x <= 20; $x++) $data[] = array('1,2,3,4,5,6,7,8,9,10', ($m * $x)+$b); $legend_text = array($next, $thism, $text3); $plot = new PHPlot(800, 600); $plot->SetTitle($thism." (Shawbury +0.5C as proxy)"); $plot->SetDataType('data-data'); $plot->SetDataValues(read_prices_text_data(DATAFILE)); $plot->SetPlotType('linepoints'); $plot->SetDataColors(array('green')); $plot->SetLegend($legend_text); $plot->SetLegendWorld(0, 20); $plot->SetXLabelAngle(90); $plot->SetXTickPos('none'); $plot->SetLineStyles('solid'); $plot->SetLineWidths(2); $plot->SetYDataLabelPos('plotin'); $plot->SetDrawBrokenLines(True); $plot->DrawGraph();