Correction: to find $y2 it should be...
// set y side to a proportional size
$y2 = $m * $x_max; // not $x1
Thanks Norbert =)Correction: to find $y2 it should be...
// set y side to a proportional size
$y2 = $m * $x_max; // not $x1
Thanks Norbert =)