Add X and Y attributes to nodes