Estimating a function of bounded variation

The function is estimated from n=100 noisy observations using least absolute deviations with a penalty on the total variation. The initial value of the smoothing parameter is zero, and as the smoothing parameter gets larger, the estimated function becomes smoother (in the limit it is a straight line).
In this example, the underlying function is a sine-function. Functions of bounded variation need not be that smooth, they may have kinks and jumps.