apply xy coords to the nodes