Is it possible to get the data point of a fitted curve?
I have to use them to calculate the area of the curve.
I use setCurveAttribute(QwtPlotCurve::Fitted,true);
G
Is it possible to get the data point of a fitted curve?
I have to use them to calculate the area of the curve.
I use setCurveAttribute(QwtPlotCurve::Fitted,true);
G
The splines are calculated for the points after they have been translated into pixel positions. If you want to do the same in your application code translate the points using the canvas maps and use a QwtSplineCurveFitter. Then you can retranslate the calculated points with the maps.
If all you want to do is to fill the area below the curve better use QwtPlotCurve::setBrush instead.
Uwe
I have no idea how to get the data of the fitted curve
I use the attribute "Fitted" in setCurveAttribute.
Now, in order to compute the area I should have an array of values of the generated curve.
I see in Qwt:
canvasMap() which returns the map.
And then?
I tried the following code:
(I have 12 curves called dSolar)
Qt Code:
QwtSpline s; s=c->spline(); double inter = s.value(0); qDebug()<<"Data size="<<dSolar[11]->dataSize()<<s.value(0)<<s.value(180);To copy to clipboard, switch view to plain text mode
but I get alwasy zero values...
Bookmarks