It's not a cubic spline as the line always passes through the data points. It's not a polynomial - I have mapped a 6th order polynomial over seven data points and it is very different. Bard admits to not knowing:"The moving average algorithm that Google Sheets uses to generate smooth line charts is not a simple weighted moving average algorithm.
"A simple weighted moving average algorithm would not go through all of the data points in the series."The moving average algorithm that Google Sheets uses to generate smooth line charts is not a simple weighted moving average algorithm. A simple weighted moving average algorithm would not go through all of the data points in the series." Here's the type of data I'm working with:
And here's how Sheets interpolates it:
I'm looking for a way to replicate the smoothing programatically in order to interpolate between the data points similarly to Sheets.





For documentation: https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.CubicSpline.html
– Vrael Oct 01 '23 at 22:09import numpy as np; from scipy.interpolate import CubicSpline; x = np.linspace(0, 3, 3); y = np.sin(x); cs = CubicSpline(x, y);