Results 1 to 3 of 3

Thread: SetSamples Function

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Dec 2017
    Posts
    19
    Thanks
    10
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: SetSamples Function

    Quote Originally Posted by d_stranz View Post
    There is no setSamples() method for QwtPlotCurve that takes a double, double, and int as arguments. That's what the compiler is telling you.

    QwtPlotCurve has no idea of the shape of the curve - it doesn't compute it, you have to compute it yourself and give the point values to QwtPlotCurve either as arrays (the setSamples version that takes double * xData, double * yData, int size as arguments) or as vectors (the setSamples version that takes QVector<double> & xData, QVector<double> & yData).

    The code in the curvdemo1 example in your Qwt distribution shows one way of doing this.
    Thanks a lot for your reply 🖤🖤🖤
    I want to plot real time data in the form like CPUPLOT example which X axis varies according to time changes and the curve is shifted to the left.
    The CPUPLOT example has been decorated by some functions that make it hard a bit for beginners.
    May I ask you let me know that which functions I should use or any further information that is critical?
    Last edited by CodeFreak; 4th January 2018 at 12:02.

Similar Threads

  1. Using QwtPlotSpectroCurve::setSamples with large data
    By raphael.lencrerot in forum Qwt
    Replies: 2
    Last Post: 4th October 2013, 16:35
  2. pass member function as argument int template function
    By bibhukalyana in forum General Programming
    Replies: 1
    Last Post: 12th March 2013, 07:05
  3. Replies: 11
    Last Post: 5th September 2012, 20:47
  4. Replies: 4
    Last Post: 2nd August 2012, 07:42
  5. Replies: 0
    Last Post: 10th March 2010, 08:13

Tags for this Thread

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.