Fixed the use of x coord instead of y in linearize.

Fixed this use of the x coord. Results are now in line with the expected behavior.