If you want to smooth out the peaks and valleys, you take the average or median of a group of data . Cycle through the entire data set.
You can then stretch and shift the visualization however you want through addition, subtraction, multiplication, etc...like how you would manipulate a sine curve.