Results 1 to 6 of 6

Thread: how to get axis range when autoscale is on?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2013
    Posts
    28
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to get axis range when autoscale is on?

    Quote Originally Posted by Uwe View Post
    Are you reinventing a QwtPlotMarker::HLine marker ?

    Uwe
    Sorry but I didn't think I need a QwtPlotMarker::HLine marker because the regression line I was drawing could have any slope. I checked the doc of QwtPlotMarker again but found no useful info on this. Tell me if I missed something. Thanks again!

    Quote Originally Posted by Uwe View Post
    Are you reinventing a QwtPlotMarker::HLine marker ?

    Uwe
    Sorry but I didn't think I need a QwtPlotMarker::HLine marker because the regression line I was drawing could have any slope. I checked the doc of QwtPlotMarker again but found no useful info on this. Tell me if I missed something. Thanks again!

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

    Default Re: how to get axis range when autoscale is on?

    Well, how is your regression line defined: y = m * x + t ?

    For such a thing I would implement my own plot item. In its draw method you know the geometry of the canvas and using QLineF you can easily calculate the cutting points of the line with the canvas borders.
    The rescaler example shows a plot item that draws a rectangle ( only an example, with QwtPlotShapeItem this could be done as well ). Your plot item will - of course - be different, but not more difficult.

    Uwe

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

    hind (4th July 2013)

Similar Threads

  1. Disabling autoscale is not wirking
    By P@u1 in forum Qwt
    Replies: 2
    Last Post: 27th July 2011, 09:25
  2. Replies: 2
    Last Post: 8th July 2011, 00:06
  3. axis autoscale: 2 user case scenarios
    By fatecasino in forum Qwt
    Replies: 1
    Last Post: 19th January 2011, 02:11
  4. autoScale doesn't work
    By Braunstein in forum Qwt
    Replies: 4
    Last Post: 12th November 2010, 18:22
  5. Replies: 1
    Last Post: 21st April 2010, 02:54

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
  •  
Qt is a trademark of The Qt Company.