max($x), 'y'=>max($y)); $min = array('x'=>min($x), 'y'=>min($y)); #Begin creating and drawing onto image $height = 400; $width = 400; $color = 0x00FF0000; #Alpha, then RGB $image = imagecreatetruecolor($height, $width); imagesavealpha($image, true); $trans_colour = imagecolorallocatealpha($image, 0, 0, 0, 127); imagefill($image, 0, 0, $trans_colour); #have to do the first one to initialize it $xpt = $height*($x[0] - $min['x'])/($max['x'] - $min['x']); $ypt = $width*($y[0] - $min['y'])/($max['y'] - $min['y']); $prev = array('x'=>$xpt,'y'=>$ypt); for($i=0; $i$xpt,'y'=>$ypt); } header('Content-Type: image/png'); imagepng($image); imagedestroy($image); ?>