Results 1 to 2 of 2

Thread: zooming only x

  1. #1
    Join Date
    May 2009
    Qt products
    Qt4 Qt/Embedded
    Unix/X11 Windows

    Default zooming only x

    I need to plot a set of data, and then I need to zoom only the x axis, and panning to scroll the plot.
    Using simple_plot.cpp example I am able to plot data vector.
    Then how can I zoom x axis?


    ps: I tried QwtPlotMagnifier with poor results.

  2. #2
    Join Date
    Feb 2006
    Munich, Germany
    Thanked 876 Times in 824 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    MacOS X Unix/X11 Windows

    Default Re: zooming only x

    With QwtPlotZoomer you can zoom in/out by selecting rectangles with the rubberband. A zoomer is always related to an x and a y axis. With zoomer->setAxis(int, int) you can change this relation. Use an invalid id for the y axis to disable it.

    QwtPlotMagnifier uses wheel/mouse events to zoom in/out in steps. The default magnifier is zooms all axes. You can change this with QwtPlotMagnifier::setAxisEnabled().


Similar Threads

  1. Zooming effect by scaling widgets
    By Cruz in forum Qt Programming
    Replies: 3
    Last Post: 1st February 2009, 09:43
  2. Replies: 1
    Last Post: 6th January 2009, 14:21
  3. Scaling and zooming with logarithmic scales
    By Benoît Hubert in forum Qwt
    Replies: 1
    Last Post: 11th September 2008, 09:17
  4. Zooming on PushButton Press event
    By KosyakOFF in forum Qwt
    Replies: 5
    Last Post: 11th April 2008, 09:12
  5. Replies: 3
    Last Post: 11th March 2007, 13:04

Tags for this Thread


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.