QwtWeedingCurveFitter *velocityCurve = new QwtWeedingCurveFitter();
velocityCurve->setTolerance(1.0);
//QwtSplineCurveFitter *velocityCurve = new QwtSplineCurveFitter ();
curve->setCurveFitter(velocityCurve);
const double x[] = {0, 1, 2, 4, 5, 8, 10, 13, 14, 19};
const double y[] = {17, 16.5, 8, 3, 5, 7.5, 9, 10, 12, 14};
curve->setSamples(x, y, 10);
curve->attach(leftGraph);
leftGraph->replot();
QwtWeedingCurveFitter *velocityCurve = new QwtWeedingCurveFitter();
velocityCurve->setTolerance(1.0);
//QwtSplineCurveFitter *velocityCurve = new QwtSplineCurveFitter ();
QwtPlotCurve *curve = new QwtPlotCurve();
curve->setStyle(QwtPlotCurve::Lines);
curve->setCurveFitter(velocityCurve);
curve->setCurveAttribute(QwtPlotCurve::Fitted, true);
const double x[] = {0, 1, 2, 4, 5, 8, 10, 13, 14, 19};
const double y[] = {17, 16.5, 8, 3, 5, 7.5, 9, 10, 12, 14};
curve->setSamples(x, y, 10);
curve->attach(leftGraph);
leftGraph->replot();
To copy to clipboard, switch view to plain text mode
Bookmarks