Results 1 to 4 of 4

Thread: Plot auto-scaling

  1. #1
    Join Date
    Jul 2013
    Posts
    7
    Thanks
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Plot auto-scaling

    I am using Qt+Qwt for real time signal plotting. I need to auto-scale the y-axis so that the canvas size covers the data.

    I tried QwtScaleEngine::Attribute::Floating = true to achieve the cumulative min-max. But I want to auto-scale my plot such that the boundaries are not taken from the min-max of data starting from time zero, but starting from another time.

    How can I obtain time based min-max? (i.e. the auto-scale of my plot between times 5-10). I know one way is to check out all data between these times to find the max and min, then scale accordingly.

    Is there a faster method at Qwt library?
    Last edited by ccbaci; 26th July 2013 at 15:04.

  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: Plot auto-scaling

    Quote Originally Posted by ccbaci View Post
    But I want to auto-scale my plot such that the boundaries are not taken from the min-max of data starting from time zero, but starting from another time.
    Setting a specific time independent from the data is the opposite of autoscaling !
    What exactly do you want to to: setting a specific start, while the end needs to be adjusted to the upper limit of the curve ?

    Uwe

  3. #3
    Join Date
    Jul 2013
    Posts
    7
    Thanks
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Plot auto-scaling

    Thanks for quick reply! I will be more clear about my issue.

    image006.gif

    I have something similar to this signal. Since I am plotting real-time, if time exceeds 0.08, I change my x interval from (0-0.08) to (0.08-0.16). I have my scale engine floating y left = true. So, the canvas height is increasing with time.

    Suppose the signal envolope is started to narrow down -instead of expanding- after time 0.06. Since I have my uppermost data at 0.06; the autoscale takes the min-max from there. However, after 0.08 -on my second time interval, I need my canvas expand according to the data AFTER 0.08. I do not need to see before. This is my main issue.

    So, yes, I exactly need a specific start. I don't know which methods are the best for my aim.

  4. #4
    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: Plot auto-scaling

    Isn't this more or less the same question as in: http://www.qtcentre.org/threads/5612...or-many-Curves ?

Similar Threads

  1. Replies: 6
    Last Post: 14th February 2013, 04:21
  2. improve the auto scaling of axis
    By 21did21 in forum Qwt
    Replies: 7
    Last Post: 7th July 2011, 20:26
  3. Y axis not auto scaling
    By pkj in forum Qwt
    Replies: 0
    Last Post: 12th May 2011, 17:05
  4. QLabel - auto font scaling possible?
    By Byngl in forum Qt Programming
    Replies: 1
    Last Post: 11th October 2007, 17:50

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.