[Tex/LaTex] What “smooth” plot interpolation algorithm does pgfplots use

algorithmscurve fittingpgfplotstikz-pgf

In the pgfplots manual it says:

\addplot+[smooth]
Smooth plots interpolate smoothly between successive points.

In order to choose the right sampling of points from a function evaluation for plotting, I need to know with some detail what is the "interpolation" that "smooth plot" actually pgfplots (or tikz) implements.

For example, is it cubic splines (probably not), Akima splines, home brew?
If it is not a standard one, what properties does it have? continuity, continuity of first derivative, second derivative, monotonicity, maximum tolerated curvature?

Best Answer

It uses cubic bézier curves to connect the points of your plot, with the two supports for each point calculated using a relatively simple algorithm that takes the previous and next point into account.