You can try to use a QwtCurveFitter:
a) QwtSplineCurveFitter
Spline interpolation avoids edges, when you don't have enough points.
b) QwtWeedingCurveFitter
This is an implementation of the Douglas-Peucker algorithm. In opposite to spline interpolation it decreases the number of points.
I guess QwtWeedingCurveFitter is what you are looking for. Unfortunately this is a new class you find in Qwt SVN trunk only. But AFAIR the class is compatible with Qwt 5.2. So you can copy it into your code - or add it to your 5.2 package.
QwtWeedingCurveFitter *fitter = new QwtWeedingCurveFitter();
fitter->setTolerance(...);
curve->setCurveFitter(fitter);
QwtWeedingCurveFitter *fitter = new QwtWeedingCurveFitter();
fitter->setTolerance(...);
curve->setCurveFitter(fitter);
curve->setCurveAttribute(QwtPlotCurve::Fitted, true);
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks