Results 1 to 2 of 2

Thread: zooming only x

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Posts
    75
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    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?

    thanks

    ps: I tried QwtPlotMagnifier with poor results.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    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().

    Uwe

Similar Threads

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

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.