Results 1 to 6 of 6

Thread: Markers and their fast display on plot

  1. #1
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    6

    Default Markers and their fast display on plot

    Hello!

    I want to know what I can do with next problem...

    I have a lot of curves ( that are brushed/solid ) and I want to display values ( Y ) in some point pos.x() of the QwtPlot.
    For displaying I am using QwtPlotMarker's.

    But it is work to slowly display when I drag mouse and program need to recalculate and replot QwtPlot.

    So can I do in this situation?
    As I understand that problem is with function replot().... There is hard for program to do replot() with a lot of brushed/solid curves...
    And as I understand without replot() I can't display QwtPlotMarker...

    And another one question:
    I can do that marker will show in brushed rectangle, but how i can do that marker will show in f.e. circle?
    Last edited by carhun; 9th August 2012 at 09:09.

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Markers and their fast display on plot

    You could create transparent plot without axes, stack it on top of the current plot and attach all markers to this one.
    reploting it will be much faster.

    You also re-engineer plotting to re-plot only affected part of the plot, not whole plot.

    You could create simple transparent overlay on which you would draw your markers (not qwtplotmarker) and interact with them.

    Qwt could greatly benefit from layered approach.
    Items that change more offten should be put in different (foreground) layer than those more static objects.
    Reploting layer of markers would be much faster than reploting all markers and curves on the plot.

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

    Default Re: Markers and their fast display on plot

    Quote Originally Posted by Spitfire View Post
    Qwt could greatly benefit from layered approach.
    Items that change more offten should be put in different (foreground) layer than those more static objects.
    Qwt has this layered approach - the z value of the plot items. You can easily introcuce a cache for plot items below a certain z value by overloading QwtPlot::drawItems.

    Uwe

  4. #4
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Markers and their fast display on plot

    That's what I meant.
    I know about the z-value but there's no out-of-the-box way of doing it.
    I'm not saying it can't be done, I'm just suggesting that it would be nice out-of-the-box feature

  5. #5
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    6

    Default Re: Markers and their fast display on plot

    Quote Originally Posted by Uwe View Post
    Qwt has this layered approach - the z value of the plot items. You can easily introcuce a cache for plot items below a certain z value by overloading QwtPlot::drawItems.

    Uwe
    Is it example of this?

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

    Default Re: Markers and their fast display on plot

    Quote Originally Posted by Spitfire View Post
    That's what I meant.
    I know about the z-value but there's no out-of-the-box way of doing it.
    I'm not saying it can't be done, I'm just suggesting that it would be nice out-of-the-box feature
    I usually prefer to use overlay widgets, because with this technique Qt calculates optimized update regions, what results in a better performance - important for user interactions. On fast multicore systems this might be neglectable, but on many other systems it will be significant.

    In SVN trunk you find a new class QwtPlotOverlay that was made for this use case. You also find a new example called itemeditor, that shows how to implement an editor that drags objects on the plot canvas.

    Uwe

Similar Threads

  1. Display lots of text fast
    By franco.amato in forum Qt Programming
    Replies: 6
    Last Post: 1st January 2010, 20:53
  2. Help: How to draw markers on plot?
    By jwieland in forum Qwt
    Replies: 5
    Last Post: 24th November 2009, 11:22
  3. Fast image plotting and display
    By babu198649 in forum Newbie
    Replies: 1
    Last Post: 6th December 2008, 13:29
  4. Best way to display lots of data fast
    By New2QT in forum Newbie
    Replies: 4
    Last Post: 16th October 2008, 22:46
  5. How to display QTableWidget fast with row > 10000?
    By chenw8 in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2007, 12:29

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.