Results 1 to 2 of 2

Thread: Scaling Issue

  1. #1
    Join Date
    May 2008
    Posts
    25
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Scaling Issue

    Ok, so I think I'm having a blond moment.

    If I have a plot with multiple curves, how can I autoscale the Y axis for each curve?

    I have linked up a right click event to return the selected curve, but I then want to rescale the plot to this curve data.

    This is because each curve has wildly different Y values, so one has y-values between -1e-8 and 2e-8 and another one might be -10 to 10.

    I've tried grabbing the boundingRect() of the Curve and then reseting the ZoomBase, but I don't think this is a great option.

    Any help appreciated.

    Cheers

  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: Scaling Issue

    Qt Code:
    1. const QwtDoubleRect br = curve->boundingRec();
    2. plot->setAxisScale(curve->yAxis(), br->top(), br->bottom());
    To copy to clipboard, switch view to plain text mode 

    Uwe

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

    cnbp173 (19th February 2009)

Similar Threads

  1. Replies: 3
    Last Post: 2nd February 2009, 23:40
  2. QTransform scaling and translate feature.
    By AmolShinde_8 in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2008, 10:31
  3. qt4.4 pc specs requirements or qt3 support issue?
    By triperzonak in forum Installation and Deployment
    Replies: 0
    Last Post: 9th August 2008, 02:40
  4. Ignoring scaling graphics view/scale
    By maverick_pol in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 17:44
  5. Replies: 12
    Last Post: 25th May 2006, 21:12

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.