xy_coords now takes independent doubles instead of tuples for speed.