Smooth graphs in detector using maxima and minima