Results 1 to 5 of 5

Thread: Patch Multi Axes Zoom

  1. #1
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Patch Multi Axes Zoom

    Hello. I apologize for my English.
    I have installed the library QWT 6.0.0 with Patch Multi Axes Support.
    I displayed on the graph two curves, with two axes Y.
    I connect an object of class Zoomer for each curve (as in Example Bode from Qwt).
    Qt Code:
    1. class Zoomer: public QwtPlotZoomer
    2. {
    3. public:
    4. Zoomer(int xAxis, int yAxis, QwtPlotCanvas *canvas):
    5. QwtPlotZoomer(xAxis, yAxis, canvas)
    6. {
    7. setTrackerMode(QwtPicker::AlwaysOff);
    8. setRubberBand(QwtPicker::NoRubberBand);
    9. setMousePattern(QwtEventPattern::MouseSelect2,
    10. Qt::RightButton, Qt::ControlModifier);
    11. setMousePattern(QwtEventPattern::MouseSelect3,
    12. Qt::RightButton);
    13. }
    14. };
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. int xb = QwtPlot::xBottom;
    2. int yl = QwtPlot::yLeft;
    3. curv1->setAxes(xb,yl);
    4. myPlot->enableAxis(yl);
    5. curv1->attach(myPlot);
    6.  
    7. int xb2 = QwtPlot::xBottom;
    8. int yl2 = QwtPlot::yLeft+1;
    9. curv2->setAxes(xb2,yl2);
    10. myPlot->enableAxis(yl2);
    11. curv2->attach(myPlot);
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. d_zoomer[0] = new Zoomer( xb, yl,
    2. myPlot->canvas());
    3. d_zoomer[0]->setRubberBand(QwtPicker::RectRubberBand);
    4. d_zoomer[0]->setTrackerPen(QColor(Qt::white));
    5.  
    6. d_zoomer1[0] = new Zoomer( xb2, yl2,
    7. myPlot->canvas());
    To copy to clipboard, switch view to plain text mode 
    But when I want to zoom chart, for example, as shown in the attached picture, chart scale is not between 0 and 1 on the axis X, and from 0 to 0.12.
    qwt2.jpg
    qwt3.jpg

    What am I doing wrong?

  2. #2
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Patch Multi Axes Zoom

    Do you have any ideas? When I work with one axis of Y, the scaling works fine.

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

    Default Re: Patch Multi Axes Zoom

    Quote Originally Posted by oddytz1989 View Post
    Do you have any ideas? When I work with one axis of Y, the scaling works fine.
    Obviously the patch doesn't work for the zoomer.

    Uwe

  4. #4
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Patch Multi Axes Zoom

    Post compilable example of the problem when we may be able to help.

  5. #5
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Patch Multi Axes Zoom

    I apologize for the trouble. I found a bug myself. Everything is working fine.

Similar Threads

  1. Replies: 2
    Last Post: 22nd April 2012, 07:12
  2. Replies: 2
    Last Post: 18th November 2010, 08:01
  3. Zoom and pan with two y-axes
    By mjfj in forum Qwt
    Replies: 1
    Last Post: 19th October 2010, 10:39
  4. Default axes after calling zoom(0)
    By Paladin12 in forum Qwt
    Replies: 3
    Last Post: 8th December 2008, 23:40

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.