Results 1 to 2 of 2

Thread: Efficiently plotting curves

  1. #1
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    387
    Thanks
    101
    Thanked 15 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Efficiently plotting curves

    Hello there,

    I need a solution for plotting curves in a fast paced scientific application. So far I'm using a self made widget, that stores the data points in a ring buffer and draws the curve by connecting the data point by point with a line. The data arrives in real time and whenever I get a new data point, I feel the need to shift the whole plot one unit to the left. It's like viewing a time series shifting by in real time if you know what I mean. So with each update of the screen I iterate through the whole buffer and draw the entire curve on the screen in paintEvent(). This is about as fast as my grandma making chicken soup.

    Any ideas of how I can get the most performance out of it? I'm looking at Qwt, but does it do anything differently performance wise? Is there a simple trick I can use to juice up my own plotter puppy?

    Thanks,
    Cruz

  2. #2
    Join Date
    Sep 2008
    Posts
    23
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Efficiently plotting curves

    I'm using Qwt in an fast paced scientific application, too (well, maybe not as fast as yours ?) and the performance is really good.

    Take a look at the differences between e.g. QwtPlotCurve::setData() and setRawData() and make sure you do not unnecessarily reset the plots. But even then it should be fast enough.

Similar Threads

  1. Efficiently plotting 2d data in a QGraphicsscene
    By xenome in forum Qt Programming
    Replies: 0
    Last Post: 5th September 2009, 15:58
  2. Replies: 10
    Last Post: 18th September 2008, 15:14
  3. Replies: 1
    Last Post: 11th September 2008, 09:07
  4. Plotting part of a curve
    By viridis in forum Qwt
    Replies: 6
    Last Post: 21st July 2008, 08:12
  5. Multi curves plotting issue
    By fallen in forum Qwt
    Replies: 5
    Last Post: 6th May 2008, 05:47

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