Results 1 to 2 of 2

Thread: Qwt and big data

  1. #1
    Join Date
    Sep 2015
    Posts
    36
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Qwt and big data

    I have a question about using Qwt with quite large number of samples. We can easily create a plot by using setSamples from QwtPlotCurve. But what if our plot has like 1000 pixels in width and we have 5 million samples? Is QwtPlotCurve smart enough to pick 1000 adequate samples from 5 million? And if so - is it smart enough to make it efficient? For example using multiple threads to do the job faster? Or maybe there is something in Qwt that is worth using in such case without writing sample selection myself?

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt and big data

    Quote Originally Posted by Khaine View Post
    But what if our plot has like 1000 pixels in width and we have 5 million samples?
    If possible it is much better to limit the number of samples outside the render cycle ( QwtPlot::replot ). In case of line plots you could use QwtWeedingCurveFitter, but this is a very heavy algo and even with using a reasonable chunkSize it will be too slow for doing it inside replot.
    Is QwtPlotCurve smart enough to pick 1000 adequate samples from 5 million?
    In SVN trunk ( aka. Qwt 6.2 ) you find QwtPlotCurve::FilterPointsAggressive. This is a special mode for line plots, where the points are ordered in x or y direction. It is very fast and can be done inside of replot. So if your samples match the criterion it is worth a try.
    For example using multiple threads to do the job faster?
    In case of scatter plot ( see the scatterplot demo ) there is such a thing. But in general the Qt paint engines are not reentrant and: slow / 4 usually remains being slow.

    In case of having the option you could use Qt4/X11 ( using the "native" graphiscsystem ) to have a hardware accelerated backend. When going with Qwt from SVN trunk you could also try the QwtPlotCancas::OpenGLBuffer to have hardware acceleration.

    ciao,
    Uwe

Similar Threads

  1. Replies: 8
    Last Post: 16th July 2015, 19:44
  2. Replies: 1
    Last Post: 27th February 2015, 06:00
  3. Replies: 0
    Last Post: 25th February 2014, 16:17
  4. Replies: 1
    Last Post: 26th November 2013, 20:25

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.