grayscale with f

change figure code so that the grayscale of each point scales with the
value of f