sorted pulses with respect to the y axis