Results 1 to 2 of 2

Thread: setAxisScale(1) doesn't do anything

  1. #1
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default setAxisScale(1) doesn't do anything

    This works fine to update the vertical axis

    Qt Code:
    1. qwtPlot->setAxisScale(0,yAxisMinSpinBox->value(),yAxisMaxSpinBox->value());
    2. qwtPlot->replot();
    To copy to clipboard, switch view to plain text mode 

    This doesn't do anything

    Qt Code:
    1. qwtPlot->setAxisScale(1,xAxisMinSpinBox->value(),xAxisMaxSpinBox->value());
    2. qwtPlot->replot();
    To copy to clipboard, switch view to plain text mode 

    Doesn't matter what I pass for xAxisMinSpinBox and xAxisMaxSpinBox for axis 1, just doesn't do anything.

    How can I adjust the horizontal axis?

  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: setAxisScale(1) doesn't do anything

    Use QwtPlot::Axis enum values instead of plain integers: 1 is yRight not xBottom or xTop.

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    rakkar (19th September 2009)

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.