Results 1 to 5 of 5

Thread: Get the points of a fitted curve

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Posts
    276
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default Re: Get the points of a fitted curve

    Quote Originally Posted by Uwe View Post

    If all you want to do is to fill the area below the curve better use QwtPlotCurve::setBrush instead.

    Uwe
    Thank you, but I need them in order to compute the area. Is there any method in Qwt to compute the area under the curve (not just filling)?

  2. #2
    Join Date
    May 2008
    Posts
    276
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default Re: Get the points of a fitted curve

    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?

  3. #3
    Join Date
    May 2008
    Posts
    276
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default Re: Get the points of a fitted curve

    I tried the following code:
    (I have 12 curves called dSolar)
    Qt Code:
    1. c=(QwtSplineCurveFitter*)dSolar[11]->curveFitter();
    2.  
    3. s=c->spline();
    4. double inter = s.value(0);
    5. 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...

Similar Threads

  1. Replies: 5
    Last Post: 10th October 2008, 06:44
  2. Plotting part of a curve
    By viridis in forum Qwt
    Replies: 6
    Last Post: 21st July 2008, 08:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.