Results 1 to 4 of 4

Thread: Best way to do continuos plotting in real time using qwt

  1. #1
    Join Date
    Apr 2013
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Best way to do continuos plotting in real time using qwt

    Hello i am new to QT and QWT and i am doing an application that must plot and do some calculus in phasors data coming from ADs.

    At first i am using a QTimer to simulate the IRQ from the device driver, the QTimer calls a funcion from 200ms to 200ms.
    Inside the function i am doing this

    Qt Code:
    1. curve1->setSamples(buff_x,buff_sin_results[tosqueira],1000);
    2. curve1->attach(this->ui->qwtPlot);
    3.  
    4. curve2->setSamples(buff_x_2,buff_sin_results_2[tosqueira],1000);
    5. curve2->attach(this->ui->qwtPlot);
    6.  
    7. curve3->setSamples(buff_x_3,buff_sin_results_3[tosqueira],1000);
    8. curve3->attach(this->ui->qwtPlot);
    9.  
    10. curve4->setSamples(buff_x_4,buff_sin_results_4[tosqueira],1000);
    11. curve4->attach(this->ui->qwtPlot);
    12.  
    13. ui->qwtPlot->replot();
    To copy to clipboard, switch view to plain text mode 
    These are 4 buffers that i pre-calculated in some other function and i am just plotting them.
    It works but is it the best way to do it performance wise?

    Thank you very much

  2. #2
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Best way to do continuos plotting in real time using qwt

    Oh just remembered my last account password hehe.
    I saw that i don't need to do an attachment everytime, just when the curve is created.
    Last edited by aprado; 10th April 2013 at 13:21.

  3. #3
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Best way to do continuos plotting in real time using qwt

    Can i have memory leak problems by using setsample instead of setrawsample?
    Forgive me for my dumb questions but qwt really lack basic tutorials and etc. Isnt enough just to throw big example codes in the zip and expect the code to be the documentation, all you have is a doxygen to the classes and source code examples.

  4. #4
    Join Date
    Jun 2013
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Best way to do continuos plotting in real time using qwt

    Hi, I have a similar problem. Did you find a good solution to solve this problem?

    Best
    Andre

Similar Threads

  1. Qwt real time plotting
    By santoshpradeep in forum Qwt
    Replies: 8
    Last Post: 28th June 2012, 09:53
  2. Real time data plotting using Qwt
    By nagabathula in forum Qwt
    Replies: 8
    Last Post: 7th July 2011, 16:47
  3. Replies: 2
    Last Post: 24th June 2011, 05:31
  4. real time plotting
    By agostain in forum Qwt
    Replies: 0
    Last Post: 10th August 2009, 10:47
  5. real time plotting
    By gyre in forum Qwt
    Replies: 4
    Last Post: 11th December 2007, 16:13

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.