Hi everyone, Is it possible to order a list of (x,y) coordinates in Mathematica by x, then y? I currently have a number of data files in which there are 5 columns: x, y, area, circularity, radius. I would like to order the list by x and y coordinates while keeping the rows intact. Thank you
There is Code (Text): Sort[list, p] sorts using the ordering function [i]p[/i]. For p you could use something like Code (Text): p[a_, b_] := (a[[1]] < b[[1]]) || (a[[1]] == b[[1]] && a[[2]] < b[[2]])