I am preparing some code to interpolate a serie of points with splines.
There are many kinds of splines: quadratic, cubic, many boundary conditions...
So far I have tried the most popular ones: cubic splines, with boundary conditions:
- Natural: second derivative is zero at first and last points.
- Clamped: first derivative is zero at first and last points.
- Not-a-knot: third derivative is continuous at second and second-to-last points.
I have also tried quadratic splines with "clamped" initial condition.
I have discovered that Plotly also has a built-in interpolation function when we define the trace like this:
fig.add_trace(go.Scatter(
x=df['timestamp'],
y=df['values'],
mode='lines',
line_shape='spline',
))
This plotly's spline looks very good for my taste. It is soft and has less oscillation than, for example, the natural cubic spline:
Red line is natural cubic spline. Gray line is plotly's spline.
So my question is: What exact kind of spline is this?
I have tried to compare it with the curves I have mentioned above. None of them is like the Plotly's spline.
I have checked Plotly's documentation and it does not tell you what kind of curves are they using. But it says that you can add the parameter "smoothing" in order to control the curvature.
Does anyone know how the Plotly guys do it?

