Results 1 to 2 of 2

Thread: axis autoscale: 2 user case scenarios

  1. #1
    Join Date
    Nov 2010
    Posts
    142
    Thanks
    24
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: axis autoscale: 2 user case scenarios

    I want to add a curve, and after some calculations I want to add a second curve.
    From this point let's consider 2 user case scenarios:

    1. The axis scaling remains as it is (we can see fully the first curve) and only the points of the second curve which are contained in the current axis are plotted (even none if the second curve is in a "faraway" region)

    2.The axis rescale in order to put both curves in the same plot.

    How should I combine the axis scale functions in order to implement these user case scenarios?


    Added after 1 35 minutes:


    After a basic set up of this implementation I have managed so far:


    • attach first curve-correctly scaled
    • attach second curve - badly/not correctly scaled
    Last edited by fatecasino; 16th January 2011 at 20:34.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: axis autoscale: 2 user case scenarios

    What exactly do you expect the plot to do? Look at your two curves and decide all by itself what the axis scale should be?

    Your application knows about the data that is in the two curves. So after you load the second curve, if its range is larger than the range for the first curve then you have to call QwtPlot::setAxisScale() (and setZoomBase() if you are using a zoomer) to expand the x and/or y axis ranges so all of both curves will be displayed.

    The QwtPlot doesn't magically do it for you.

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

    fatecasino (26th January 2011)

Similar Threads

  1. qwt zoomer: a complete user case scenario?
    By fatecasino in forum Qwt
    Replies: 5
    Last Post: 24th December 2010, 11:15
  2. autoScale doesn't work
    By Braunstein in forum Qwt
    Replies: 4
    Last Post: 12th November 2010, 18:22
  3. Replies: 0
    Last Post: 9th August 2010, 10:46
  4. Replies: 2
    Last Post: 27th November 2008, 10:16
  5. How to debug with dbg in this case?
    By vql in forum Newbie
    Replies: 25
    Last Post: 2nd April 2007, 16:52

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.