Results 1 to 1 of 1

Thread: curve is not smooth enough with many sample points .

  1. #1
    Join Date
    Jul 2013
    Posts
    72
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default curve is not smooth enough with many sample points .

    Hello, my problem is Curve is not smooth enough . Size of the green curve'samples is 10, while the red one's more than 100 .As the picture shows , the green one looks much smoother than the red one . How can I make it smoother ? Please check my code and help me out .
    Qt Code:
    1. f1->setFitMode(f1->Spline);
    2. QPen pen(Qt::red);
    3. pen.setWidth(1.5);
    4. curve->setCurveFitter(f1);
    5. curve->setSamples(points);// Size of points is above 100.
    6. curve->setCurveAttribute(QwtPlotCurve::Fitted,true);
    7. curve->setPen(pen);
    8. curve->setStyle(QwtPlotCurve::Lines);
    9. curve->setRenderHint( QwtPlotItem::RenderAntialiased,true);
    10. curve->attach(this);
    To copy to clipboard, switch view to plain text mode 
    curves_many_samples.jpg
    Last edited by wysota; 28th August 2013 at 12:52. Reason: changed [qtclass] to [code]

Similar Threads

  1. drawing smooth curve to a set of points - without qwt
    By szisziszilvi in forum Qt Programming
    Replies: 0
    Last Post: 24th January 2011, 09:51
  2. Replies: 4
    Last Post: 6th October 2010, 14:29
  3. Deleting points from a curve dynamically
    By maneesh18187 in forum Qwt
    Replies: 2
    Last Post: 9th February 2010, 19:08
  4. Get a smooth curve
    By beekeep in forum Qwt
    Replies: 2
    Last Post: 7th January 2010, 18:49
  5. Get the points of a fitted curve
    By giusepped in forum Qwt
    Replies: 4
    Last Post: 25th December 2008, 08:42

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.