Results 1 to 1 of 1

Thread: Zoomer with scrollbar for multiple YLeft and YRight axes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2019
    Posts
    31
    Thanks
    8
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Zoomer with scrollbar for multiple YLeft and YRight axes

    Hi,

    I use qwt multiple axis branch and I implemented ScrollBar when zooming (from realtime example).
    This works nice with one YAxis.

    I saw propositions to use each zoomer for each YAxis but I don't think that this is a good idea beacause of ScrollBars and secondly beacause of I need fast reploting after zooming. I suppose that if I use multiple zoomers then the plot does multiple replots.

    I'm looking for a way to modify QwtPlotZoomer code to allow this zoomer to zoom along each visible axis.
    Maybe somebody could give me some hints?

    By the way, I can't make make it work with two YLeft axis and two zommers.
    Here I have two curves: one attached to QwtAxisId(QwtPlot::yLeft, 0) and another QwtAxisId(QwtPlot::yLeft, 1)
    Qt Code:
    1. QwtPlotZoomer* zoomer0 = new QwtPlotZoomer( QwtAxis::xBottom, QwtAxisId(QwtAxis::yLeft, 0).id, d_plot->canvas() );
    2. zoomer0->setMousePattern( QwtEventPattern::MouseSelect3,
    3. Qt::RightButton );
    4.  
    5. QwtPlotZoomer* zoomer1 = new QwtPlotZoomer( QwtAxis::xBottom, QwtAxisId(QwtAxis::yLeft, 1).id, d_plot->canvas() );
    6. zoomer1->setMousePattern( QwtEventPattern::MouseSelect3,
    7. Qt::RightButton );
    To copy to clipboard, switch view to plain text mode 
    I have not found any way to zoom the very YLeft axis (QwtAxisId(QwtAxis::yLeft, 1)). Only one YAxis is zoomed (QwtAxisId(QwtAxis::yLeft, 0))
    See picture
    1.png
    Last edited by Vasya; 8th August 2020 at 01:35.

Similar Threads

  1. Replies: 0
    Last Post: 29th March 2016, 17:36
  2. Scrollbar multiple y-axes
    By StrikeByte in forum Qwt
    Replies: 0
    Last Post: 14th January 2015, 15:06
  3. Replies: 11
    Last Post: 11th September 2013, 08:59
  4. Multiple axes with a relation
    By pkj in forum Qwt
    Replies: 1
    Last Post: 21st February 2011, 07:46
  5. Replies: 1
    Last Post: 2nd May 2010, 19:27

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.