Ivan, I spent several hours yesterday going through my collection of dozens and dozens of Graph plots. I compared Graph's interpolation with a standard cubic spline. Graph's interpolation works more or less OK when there are lots of samples and when the spacing isn't too nonuniform. But when there are one or more samples with significantly different spacing, it can yield funny plots that are not representative of the underlying process being sampled. This behaviour is insidious, allowing bad data to pass for good.

I use Graph to draw plots of measured data from my electronics hobby. I take manual readings from lab instruments, both analog and digital, and then use Graph to plot the points. Due to time constraints, I can't always collect as many samples as I'd like. Sometimes I sample outlier points just to complete a curve. I rely on smooth interpolation to fill in the missing data. The problem with Graph's interpolation is that you can't trust it to do a reasonable job of filling in missing points. It can generate funny curves that are nothing like the underlying process you've measured. But ordinary cubic spline interpolation works in these cases.

If you want to keep the current Graph interpolation, I strongly recommend that you add standard cubic spline interpolation that a user can invoke when necessary. Users will have to determine for themselves when to use one interpolation or another, but at least they will have the option of plotting correct, valid curves.

Cubic spline interpolation smooths a curve by making certain assumptions about the first and second derivatives of the underlying function that the data represents. Sometimes real data does not conform to those assumptions. For example, some of the electrical signals I measure may saturate. The plotted curve suddenly becomes a constant value. The circuits are operating correctly but they exhibit discontinuous or nonsmooth derivatives. Any cubic spline interpolation may generate nonconstant interpolated values over a region of constant data due to the influence of adjacent regions. Usually the error is small, but the deviation of a nonflat curve can obscure the underlying saturation, which may be entirely normal. The user is left to explain the unexpected behavior exhibited by the plot. I have added an option to my cubic spline interpolator that enables it to preserve saturated data values. See the next message. If you implement a standard cubic spline interpolation, you might consider adding such a feature. It is not often needed, but it can make the interpolation model more realistic for some data.

Brian