Results 1 to 5 of 5

Thread: how to use qwtplotzoomer to zoom only one axis?

  1. #1
    Join Date
    Oct 2014
    Location
    Paris
    Posts
    13
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default how to use qwtplotzoomer to zoom only one axis?

    I want use QwtPlotZoomer to zoom only X-axis, and leave Y-Axis fixed, Or to zoom Y-axis, and leave X-Axis fixed.
    any idea how to do this?
    Thanks.

    Abderrahim

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

    Default Re: how to use qwtplotzoomer to zoom only one axis?

    If you are using only one x and one y axis you could assign the unused opposite one. F.e when using xBottom/yLeft and you want to zoom yLeft only you would do:

    Qt Code:
    1. zoomer->setAxes( QwtPlot::xTop, QwtPlot::yLeft );
    To copy to clipboard, switch view to plain text mode 
    If your situation is more complicated you might have to overload QwtPlotZoomer::rescale( const QRectF & ), by adjusting a copy of the code you find in qwt_plot_zoomer.cpp.

    Uwe

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

    Abderrahim (8th January 2016)

  4. #3
    Join Date
    Oct 2014
    Location
    Paris
    Posts
    13
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to use qwtplotzoomer to zoom only one axis?

    Many thanks Uwe,
    My Plot has more y axis and one x-axis. I think your second proposal is the best way for my problem .
    Nice weekend
    Abderrahim

  5. #4
    Join Date
    Oct 2014
    Location
    Paris
    Posts
    13
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to use qwtplotzoomer to zoom only one axis?

    Hello Uwe,
    please help me with an example to use qwtplotzoomer for a plot with more one y-axis (y-multi-axis).

  6. #5
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,199
    Thanked 847 Times in 796 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to use qwtplotzoomer to zoom only one axis?

    You have to use several zoomers, but only one of them with a rubberband. F.e like in the bode example.

    Uwe

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

    Abderrahim (12th January 2016)

Similar Threads

  1. Zoom out with QwtPlotZoomer
    By vonheld in forum Newbie
    Replies: 0
    Last Post: 28th August 2015, 00:20
  2. QwtPlotZoomer- problem with zoom out
    By GG2013 in forum Qwt
    Replies: 2
    Last Post: 2nd September 2013, 00:11
  3. Replies: 5
    Last Post: 18th July 2012, 09:17
  4. Replies: 3
    Last Post: 10th October 2011, 16:55
  5. Replies: 3
    Last Post: 18th May 2011, 16:56

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.