anchor.diff:  (*** do-not-eval***)
   open FSharp.Stats.Fitting
   
  -let x_Data = [|1.;2.; 3.; 4.|]
  -let y_Data = [|5.;14.;65.;100.|]
  -
  -let data = Array.zip x_Data y_Data
  +let x_DataS = [|1.;2.; 3.; 4.|]
  +let y_DataS = [|5.;14.;65.;100.|]
  +
  +let data = Array.zip x_DataS y_DataS
   
   //in every x position a knot should be located
  -let knots = x_Data
  -
  -let spline lambda x = Spline.smoothingSpline data knots
  +let knots = x_DataS
  +
  +let spline lambda x = (Spline.smoothingSpline data knots) lambda x
   
   let fit lambda = 
       [|1. .. 0.1 .. 4.|]
  
positive.code:     |> Chart.Line
      |> Chart.withTraceName (sprintf "lambda: %.2f" lambda)
  
  let rawChart = Chart.Point(data)
  
  [
  rawChart
  fit 0.001
  fit 0.1
  fit 10.
  
negative.code:     |> Chart.withTraceName "raw data"
      
  let fittingLS = 
      let fit = 
          [|0. .. 4.|] 
          |> Array.map (fun x -> x,fittingFunctionLinearLS x)
      Chart.Line(fit)
      |> Chart.withTraceName "least squares"
  
  let fittingRobust = 
      let fit = 
          [|0. .. 4.|] 
          |> Array.map (fun x -> x,fittingFunctionLinearRobust x)
      Chart.Line(fit)
      |> Chart.withTraceName "TheilSen estimator"
  
  let fittingRTO = 
      let fit = 
          [|0. .. 4.|] 
          |> Array.map (fun x -> x,fittingFunctionLinearRTO x)
      Chart.Line(fit)
      |> Chart.withTraceName "through origin"
  
  (*** do-not-eval***)
  [rawChart;fittingLS;fittingRobust;fittingRTO] 
  |> Chart.Combine
  |> Chart.Show
  