@@ -344,6 +344,40 @@ For example, the following code will raise ``ValueError`` without ``axis`` param
344344 ``axis `` parameter is ignored in ND-gridded data cases.
345345
346346
347+ .. _tutorial-normalizedsmooth :
348+
349+ Smooth normalization
350+ ~~~~~~~~~~~~~~~~~~~~
351+
352+ .. versionadded :: 1.1.0
353+
354+ We can use ``normalizedsmooth `` option to normalize smooth parameter.
355+ If ``normalizedsmooth `` is True, the smooth parameter is normalized such that results are invariant to xdata range
356+ and less sensitive to nonuniformity of weights and xdata clumping.
357+
358+ Let's show it on a simple example.
359+
360+ .. plot ::
361+
362+ x1, y = univariate_data(seed=1327)
363+ x2 = x1 * 10
364+
365+ xi1 = np.linspace(x1[0], x1[-1], 150)
366+ xi2 = np.linspace(x2[0], x2[-1], 150)
367+
368+ yi1 = csaps(x1, y, xi1, smooth=0.8)
369+ yi2 = csaps(x2, y, xi2, smooth=0.8)
370+
371+ yi1_n = csaps(x1, y, xi1, smooth=0.8, normalizedsmooth=True)
372+ yi2_n = csaps(x2, y, xi2, smooth=0.8, normalizedsmooth=True)
373+
374+ f, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(8, 6))
375+ ax1.plot(x1, y, 'o', xi1, yi1, '-')
376+ ax2.plot(x2, y, 'o', xi2, yi2, '-')
377+ ax3.plot(x1, y, 'o', xi1, yi1_n, '-')
378+ ax4.plot(x2, y, 'o', xi2, yi2_n, '-')
379+
380+
347381Computing Spline Without Evaluating
348382~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
349383
0 commit comments