$i,'y'=>$j); } } /* header('content-type: text/plain'); print_r(array_keys($decibels)); die(); */ foreach ($decibels as $dB => $points) { $color = imagecolorallocate($im, $dB, $dB, $dB); foreach ($points as &$point) { imagesetpixel($im, $point['x'], $point['y'], $color); } } header('content-type: image/png'); imagepng($im); ?>