Results 1 to 2 of 2

Thread: Uwe : How to create real time plot with auto scale axis and zooming functionality.

  1. #1
    Join Date
    Nov 2014
    Posts
    23
    Thanks
    4

    Default Uwe : How to create real time plot with auto scale axis and zooming functionality.

    I have a scenario where i should be plotting real time data for an hour. But first i have to display only first 2 min in x axis, when time reaches 2 min i should expand my scale to 4 min and it should keep on going......

    I tried using QwtPlotDirectPainter which is efficient but after 2 min , i dont know how to rescale it to 4 min ....

    But if i use QwtPlotCurve with replot() and autoaxisscale() feature , i am able to acheive this, but with delay in plotting as time increases ....

    Any help will be appreciated.....


    I feel QwtPlotDirectPainter will be efficient, please give a solution with it.....
    I tried looking at Oscilloscope example , i could not get it....If possible try give source code with explanation......
    Last edited by vinothrajendran; 18th November 2014 at 11:55. Reason: updated contents

  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: Uwe : How to create real time plot with auto scale axis and zooming functionality

    Quote Originally Posted by vinothrajendran View Post
    I have a scenario where i should be plotting real time data for an hour. But first i have to display only first 2 min in x axis, when time reaches 2 min i should expand my scale to 4 min and it should keep on going......
    Qt Code:
    1. void YourPlot::addPoint( const QPointF &pos )
    2. {
    3. const QwtInterval interval = axisInterval( QwtPlot::xBottom );
    4. if ( pos.x() > interval.maxValue() )
    5. {
    6. setAxisScale( interval.minValue(), interval.maxValue() + ... );
    7. replot();
    8. }
    9.  
    10. ...
    11. }
    To copy to clipboard, switch view to plain text mode 
    Uwe

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

    vinothrajendran (20th November 2014)

Similar Threads

  1. How to real time plot?
    By RafaelRSE in forum Qwt
    Replies: 2
    Last Post: 7th August 2014, 19:14
  2. Replies: 1
    Last Post: 9th September 2013, 08:50
  3. Replies: 3
    Last Post: 12th April 2013, 07:18
  4. Axis Auto Scale
    By gkarthick5 in forum Qwt
    Replies: 3
    Last Post: 13th July 2011, 14:57
  5. 4 axis auto scale..
    By Vincenzo in forum Qwt
    Replies: 0
    Last Post: 22nd March 2009, 02: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.