sort random points by z-order and plot the ordering in a qt gui