Hello,
I need to use spline interpolation for data display in my program. There is QwtSplineCurveFitter class - documentation says, thar it uses spline to fit curve, but the results are not acceptable (or I have missed something?):
Code to fit curve between 5 points:
fitter.setFitMode(fitter.ParametricSpline);
curve1->setData(fitter.fitCurve(polygon));
curve1->attach(ui->plot);
ui->plot->replot();
QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
QPolygonF polygon;
polygon << QPointF(-1, -3);
polygon << QPointF(1, 5);
polygon << QPointF(2, 16);
polygon << QPointF(3, 8);
polygon << QPointF(4, 13);
QwtSplineCurveFitter fitter;
fitter.setFitMode(fitter.ParametricSpline);
curve1->setData(fitter.fitCurve(polygon));
curve1->attach(ui->plot);
ui->plot->replot();
To copy to clipboard, switch view to plain text mode
And this is the result:

Without using fitter class:

OS: Debian Sid
Qwt: 5.2.0-1 (libqwt5-qt4)
What's wrong there? Interpolation seems to be not working at all or spline resolution is very low but I can't see any method to increase it?
Bookmarks