Set pixel's value using x and y coordinates