Results 1 to 5 of 5

Thread: setZoomBase() of QwtPlotZoomer with value of autoReplot scale of QwtPlot

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2015
    Posts
    109
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    20

    Default Re: setZoomBase() of QwtPlotZoomer with value of autoReplot scale of QwtPlot

    As we know, if we set setAxisAutoScale(QwtPlot::xBottom, true);, then X-axis plot will be autoscale as per the input curves. so now practically my zoomBase should be the current/updated scale interval of x and y axis, not the QRectF(0,0 1000x1000). So my intention is to do like this below, which is not the correct syntax.

    Qt Code:
    1. class ZoomPlot: public QwtPlotZoomer
    2. {
    3. private:
    4. virtual void rescale() override;
    5. QwtPlot *m_plot;
    6. }
    7.  
    8. ZoomPlot::ZoomPlot(QwtPlot *plot):
    9. QwtPlotZoomer(plot->canvas())
    10. {
    11. m_plot = plot;
    12. }
    13.  
    14.  
    15. void ZoomPlot::rescale()
    16. {
    17. if(zoomRectIndex() == 0)
    18. {
    19. setZoomBase(m_plot->axisInterval(QwtPlot::xBottom)) //Its not correct, so looking for correct syntax
    20. }
    21. QwtPlotZoomer::rescale();
    22. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by npatil15; 21st February 2019 at 10:30.

Similar Threads

  1. scale in QwtSlider and QwtPlot
    By mastupristi in forum Qwt
    Replies: 3
    Last Post: 20th October 2014, 07:37
  2. QwtPlotZoomer->setZoomBase
    By gronerth in forum Qwt
    Replies: 2
    Last Post: 24th January 2014, 16:01
  3. How to hide part of a QwtPlot scale?
    By Momergil in forum Qwt
    Replies: 2
    Last Post: 6th February 2013, 19:41
  4. QwtPlotZoomer not to change the yAxis scale
    By dontgonearthecastle in forum Qwt
    Replies: 6
    Last Post: 14th January 2013, 08:43
  5. Replies: 2
    Last Post: 30th December 2010, 17:32

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
  •  
Qt is a trademark of The Qt Company.