Results 1 to 2 of 2

Thread: QwtPlot setAxisScale() is not displaying values below 1e-12 on yScale

  1. #1
    Join Date
    Nov 2017
    Posts
    1
    Qt products
    Qt4 Qt5 Qt/Embedded

    Default QwtPlot setAxisScale() is not displaying values below 1e-12 on yScale

    Hello,

    I am using a QwtPlot widget from latest example which is available on Git with Qt 4.8, which I modified it slightly to use LogScale engine to display the yLeft axis. I want minimum value of log scale to be 1e-30 where in the documentation it is mentioned that 1e-150 is the minimum value. But whenever I set less than 1e-12, it shows zeros in the scale (attached in the image).

    QwtLogScaleEngine* axesy = new QwtLogScaleEngine();
    plot->setAxisScaleEngine(QwtPlot::yLeft, axesy);
    plot->setAxisScale(QwtPlot::yLeft, 1e-30, 1e-5);

    before.jpg

    After changing minimum value to 1e-12
    plot->setAxisScale(QwtPlot::yLeft, 1e-12, 1e-5); it will display the scale correctly.


    after.jpg


    Is there any thing to be done inside the QwtPlot widget? or am I missing something?

    Thanks,
    Saket

  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: QwtPlot setAxisScale() is not displaying values below 1e-12 on yScale

    I would expect to find the reason for the problem in:

    Qt Code:
    1. QwtText QwtAbstractScaleDraw::label( double value ) const
    2. {
    3. return QLocale().toString( value );
    4. }
    To copy to clipboard, switch view to plain text mode 
    Uwe

Similar Threads

  1. use factor for displaying y values
    By phenoboy in forum Qwt
    Replies: 8
    Last Post: 20th October 2015, 11:10
  2. Skip NaN values in qwtplot
    By ivareske in forum Qwt
    Replies: 0
    Last Post: 12th October 2011, 15:01
  3. Displaying integer values into textbox
    By deck99 in forum Qt Programming
    Replies: 1
    Last Post: 10th March 2011, 14:07
  4. Item delegate displaying enumerated values
    By mclark in forum Qt Programming
    Replies: 2
    Last Post: 24th September 2010, 17:31
  5. Replies: 1
    Last Post: 25th July 2008, 09:38

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.