Results 1 to 4 of 4

Thread: Qwt zoomer does not accept new plot

  1. #1
    Join Date
    Apr 2008
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Qwt zoomer does not accept new plot

    Hello Qt community,

    I'm quite new to Qt and its my first post here. I have a problem with the zoomer. I tried some solutions posted here but non is working. Im using Qt3 and qwt500
    My Problem:
    I'm plotting different curves on a qwt-chart. When not using the zoomer, the change between a graph with an x axis range 0...1 and some other graph with an x axis range from 20..200 is accomplished fine. When I use the zoomer in one of the plotted curves, plotting the next graph does not adopt its apropriate x axis scale any more, but uses the last one.
    I tried the setZoomBase() before a replot but also after a replot. I even delete the zoomer before a new replot, and create it after the replot. It's not working.

    The code fragment:

    // delete zoomer
    if(NULL != canvasZoomer)
    {
    delete canvasZoomer;
    }

    // all curves calculated , do replot
    qwtPlotChartVisu->replot();

    // create zoomer
    canvasZoomer = new QwtPlotZoomer( QwtPlot::xBottom, QwtPlot::yLeft, qwtChartVisu->canvas() );
    canvasZoomer->setSelectionFlags( QwtPicker:ragSelection );
    canvasZoomer->setTrackerMode(QwtPicker::AlwaysOff);
    canvasZoomer->setZoomBase();

    Thank you and kind regards!

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

    Default Re: Qwt zoomer does not accept new plot

    As soon as you zoom in, you are assigning specific scales, turning autoscaling off. You have to re-enable autoscaling, before you display the next graph.

    Uwe

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

    babu198649 (24th August 2008)

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

    Default Re: Qwt zoomer does not accept new plot

    how do you "re-enable autoscaling" ? which is the proper function to do that and where should i call it from?

  5. #4
    Join Date
    Oct 2010
    Location
    Berlin, Germany
    Posts
    358
    Thanks
    18
    Thanked 68 Times in 66 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qwt zoomer does not accept new plot

    RTFM

    hint: search for "autoscale"

  6. The following user says thank you to FelixB for this useful post:

    fatecasino (21st December 2010)

Similar Threads

  1. Replies: 4
    Last Post: 10th October 2009, 17:59
  2. Qwt plot problem on compile
    By sincnarf in forum Qwt
    Replies: 2
    Last Post: 14th October 2007, 11:36

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.