Results 1 to 2 of 2

Thread: Qwt charts wtih large data set and multiple series

  1. #1
    Join Date
    Jan 2011
    Location
    Sri Lanaka
    Posts
    64
    Thanks
    39
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Qwt charts wtih large data set and multiple series

    Hi

    I have a graph, in which i have to draw multiple series (7 to 15). which will have more then 50k points for one series.

    the problem is that when i add 100k point to one series, qwt plot get really slow.
    Re-sizing and zooming function are practically impossible at 500k points.

    is there a way to handle this kind of graphs in qwt??

    image is a samal example for the kind of graph with one series,
    there have to be line series and point series on top of this.

    GraphImage.png

    Thanks

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

    Default Re: Qwt charts wtih large data set and multiple series

    Quote Originally Posted by deepal_de View Post
    is there a way to handle this kind of graphs in qwt??
    Yes, but don't expect to find a "make everything fast" flag.

    Performance optimization is always a very individual thing and requires to have a certain understanding of what is taking time.
    But at least here are some hints, when talking about QwtPlotCurve::Line curves:

    When having a zoom level, where you can see all 500k points it is obvious, that you can reduce the number of points ( point weeding ) as many of them
    are rounded to the same position on screen. When zooming you can't, but polygon clipping will speed up rendering.

    a) Polygon Clipping

    This is enabled as default setting for QwtPlotCurve

    b) Weeding

    For QwtPlotCurve::Lines you could use the Douglas Peucker algorithm ( QwtWeedingCurveFitter ) to reduce the number of points. But this is a heavy algo, that needs to be done outside of the render cycle ( number of curve points != number of points to be painted ). In SVN trunk ( a.k.a Qwt 6.2 ) you find a new flag QwtPlotCurve:: FilterPointsAggressive, that tries to unite lines ( http://zone.ni.com/reference/en-XX/h...arge_data_sets ). This algo is fast and can be used inside the render cycle ( setting the attribute is all you need to to ).

    Another thing you could try is setting the QwtPlotCanvas::OpenGLBuffer flag ( also SVN trunk ). Then the curves will be rendered hardware accelerated to an offscreen buffer - but with having some penalty for copying the buffer into memory afterwards. You could also try one of the native OpenGL based canvases, but the implementation of them is not yet finished.
    But the probably easiest way to have hardware acceleration is using Qt4/X11 ( QApplication::setGraphicSystem( "native" ) ) - if this is an option.

    Last but not least be careful with some attributes: a pen width > 1 slows down rendering significantly and antialiasing is a no-go, when rendering trillions of lines.

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    deepal_de (21st September 2015)

Similar Threads

  1. Replies: 0
    Last Post: 3rd March 2015, 10:00
  2. Large desktop for Multiple Display Monitors
    By yxtx1984 in forum Qt Programming
    Replies: 5
    Last Post: 23rd December 2011, 11:37
  3. Replies: 21
    Last Post: 8th December 2011, 03:18
  4. Replies: 8
    Last Post: 25th April 2010, 22:19
  5. Replies: 1
    Last Post: 16th April 2009, 17:12

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.