Results 1 to 2 of 2

Thread: Make QwtPlotRescaler reflect data changes

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #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: Make QwtPlotRescaler reflect data changes

    The rescaler implicitely calls setAxisScale(), what disables autoscaling. Guess if you reenable autoscaling before calling updateAxes you probably have what you want:

    Qt Code:
    1. void Window::switchData()
    2. {
    3. if ( curve->maxYValue() > LO ) curve->setData( DATA_LO, DATA_LO, N );
    4. else curve->setData( DATA_HI, DATA_HI, N );
    5.  
    6. for ( int axis = 0; axis < QwtPlot::axisCnt; axis++ )
    7. plot->setAxisAutoScale(axis);
    8.  
    9. plot->updateAxes();
    10. rescaler->rescale();
    11. }
    To copy to clipboard, switch view to plain text mode 

    HTH,
    Uwe

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

    hector1984 (26th August 2010)

Similar Threads

  1. How to make QAbstractItemModel 's data checkable
    By nifei in forum Qt Programming
    Replies: 12
    Last Post: 1st April 2013, 19:52
  2. Replies: 7
    Last Post: 25th November 2009, 12:10
  3. qwtconfig.pri changes dont reflect in make for ARM
    By gautammorey in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 20th November 2009, 08:58
  4. Replies: 0
    Last Post: 19th November 2009, 04:48
  5. How to reflect QGraphicsItem?
    By Radagast in forum Qt Programming
    Replies: 15
    Last Post: 26th June 2008, 22: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
  •  
Qt is a trademark of The Qt Company.