In my opinion the data as well as the interpolated data (in this case the spline) should not change when I change the sight on the data by changing the axes' values.
This is the whole code for the curve:
auto points = loadPlotData(); // loads the points from the attached file
curve1->setSamples(points);
curve1
->setPen
(QPen(Qt
::red));
curve1
->setLegendAttribute
(QwtPlotCurve::LegendShowLine,
true);
curve1
->setLegendAttribute
(QwtPlotCurve::LegendShowSymbol,
true);
curve1->attach(m_plot);
auto points = loadPlotData(); // loads the points from the attached file
auto curve1 = new QwtPlotCurve("Curve 1");
curve1->setSamples(points);
curve1->setSymbol(new QwtSymbol(QwtSymbol::Ellipse, QBrush(Qt::red), QPen(Qt::darkRed), QSize(8, 8)));
curve1->setPen(QPen(Qt::red));
curve1->setLegendAttribute(QwtPlotCurve::LegendShowLine, true);
curve1->setLegendAttribute(QwtPlotCurve::LegendShowSymbol, true);
curve1->setCurveAttribute(QwtPlotCurve::Fitted, true);
curve1->attach(m_plot);
To copy to clipboard, switch view to plain text mode
So there is no special spline that I am using, it is just the curve attribute QwtPlotCurve::Fitted.
I added the plot points here:
PlotData.txt
(At first I tried to upload the data as csv, but that did not work. txt did work however).
Bookmarks