Results 1 to 4 of 4

Thread: Zoomer behaviour

  1. #1
    Join Date
    Jul 2013
    Posts
    7
    Thanks
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Zoomer behaviour

    Is there a way to change the selection behaviour of the qwtzoomer ? I want to zoom only to one axis with a `line segment selection` (not with the rectangular rubber band). This is what MATLAB offers as shown in the figure attached. I already implemented the zoomer to work with yleft or xbottom only; however I couldn't find a way to select zoom region via a line segment.
    Attached Images Attached Images

  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: Zoomer behaviour

    Isn't this a rectangular rubber band on the attached image ?

    Uwe

  3. #3
    Join Date
    Jul 2013
    Posts
    7
    Thanks
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Zoomer behaviour

    Of course it is a rectangular rubber band. But MATLAB also offers line segment selection as it can be seen at the toolbar.

    @Uwe, would you be kind enough to re-check this post, too

    http://www.qtcentre.org/threads/55570-Plot-auto-scaling
    Last edited by ccbaci; 13th September 2013 at 11:45.

  4. #4
    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: Zoomer behaviour

    Well when you only have the left y axis you can simply do:

    Qt Code:
    1. zoomer->setAxis( QwtPlot::xBottom, QwtPlot::yRight );
    To copy to clipboard, switch view to plain text mode 
    Another option is to overload

    Qt Code:
    1. virtual void zoom( const QRectF & );
    To copy to clipboard, switch view to plain text mode 
    where you reset top/bottom to the current scale interval, calling the base class with the modified rect.

    For the rubberband you can overload the drawRubberBand() method.

    Uwe

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

    ccbaci (19th September 2013)

Similar Threads

  1. Problem with zoomer
    By alainstgt in forum Qwt
    Replies: 3
    Last Post: 18th April 2012, 09:46
  2. replot in Qwt Zoomer
    By ruzik in forum Qwt
    Replies: 2
    Last Post: 22nd September 2011, 18:42
  3. how to get zoomer to replot
    By kja in forum Newbie
    Replies: 3
    Last Post: 17th November 2010, 07:15
  4. Problem with Zoomer
    By rambo83 in forum Qwt
    Replies: 1
    Last Post: 10th March 2010, 12:35
  5. how could the value in every grid after zoomer?
    By matt_atlantis in forum Qwt
    Replies: 1
    Last Post: 29th July 2009, 01:26

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.