Add back peak detection at end of single plot