Results 1 to 5 of 5

Thread: QwtPlot: how to auto-scale two Y scales?

  1. #1
    Join Date
    Feb 2007
    Posts
    17
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question QwtPlot: how to auto-scale two Y scales?

    Hi guys,

    I just tried Qwt for my 2D plots and it's really nice! However, there's some small issue I'm not able to figure out looking at the Qwt's docs:

    When I have two Y-scales (left/right, for two curves) in one plot, the automatic linear scaling seems to combine the two data sets (curves) to determine the first Y-scale's range whilst the second Y-scale's range seems to be completely unrelated to the data...

    Is there a nice way to use Qwt's scaling engine to auto-adjust the first Y-scale based on the first curve's data, and the second Y-scale based on the second curve's data? If so, does it also line up the major ticks on the left and right scale in order to share a common QwtPlotGrid?

    Thanks,
    para

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

    Default Re: QwtPlot: how to auto-scale two Y scales?

    Guess you attached both curves to xBottom/yLeft ?

    Uwe

  3. #3
    Join Date
    Feb 2007
    Posts
    17
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Lightbulb Re: QwtPlot: how to auto-scale two Y scales?

    Yep, is there a way to attach a curve to an axis explicitly?

    Edit: I guess you mean QwtPlotItem::setAxis(int xAxis, int yAxis)

    Damn it,
    para the blind
    Last edited by paradiza; 23rd September 2007 at 11:44.

  4. #4
    Join Date
    Sep 2008
    Location
    Slovakia, Nitra
    Posts
    15
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QwtPlot: how to auto-scale two Y scales?

    itt doesn't work for me!!!
    ... i can attach only two axis, one x and one y, but what should i do if i want attach two x axis, and two y axis?

  5. #5

    Default Re: QwtPlot: how to auto-scale two Y scales?

    I got a similar problem.

    With help of the realtime_plot example I created a scroll- and zoomable QwtPlot.

    I attached yLeft/xBottom to one Zoomer and created another one for yRight/XTop.
    After dissabling the Tracker and the RubberBand for the second Zoomer everything is working fine.

    But now I got 4 scrollbars, moving either the one or the other curve seperatly. Would it somehow be possible to synchronize those Scrollbars, so that zooming and scrolling both curves synchron (like zooming and scrolling the canvas they're on)

    Thanks for your help in advance!

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.