import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import UnivariateSpline x = np.linspace(-3, 3, 50) y = np.exp(-x**2) + 0.1 * np.random.randn(50) # 通过random方法添加噪声数据 plt.plot(x, y, 'ro') # 平滑参数使用默认值 spl = UnivariateSpline(x, y) xs ...
.interp1d(x, y, kind="linear") x_int = np.linspace(x[0],x[-1], 20) y_int = f(x_int) #Smoothing here fig, ax = plt.subplots(figsize=(8, 6)) ax.plot(x, y, color='red', label= 'Unsmoothed curve') ax.plot(x_int, y_int, color="blue", label= "Interpolated curve"...
main bls .gitignore LICENSE README.rst filter.py medium_filter.py ruth_bls2.py setup.py Latest commit RuthAngus filter Jun 21, 2013 995b9b2·Jun 21, 2013 History History File metadata and controls executable file · 240 lines (213 loc) · 6.94 KB ...
smooth.png /usr/lib/python3/dist-packages/silx/resources/gui/icons/math-smooth.svg /usr/lib/python3/dist-packages/silx/resources/gui/icons/math-square-amplitude.png /usr/lib/python3/dist-packages/silx/resources/gui/icons/math-square-amplitude.svg /usr/lib/python3/dist-packages/silx/...