Results 1 to 2 of 2

Thread: Qwt axes and really small/large values

  1. #1
    Join Date
    Sep 2007
    Thanked 4 Times in 4 Posts
    Qt products
    MacOS X Unix/X11 Windows

    Default Qwt axes and really small/large values

    I use Qwt and have a range of doubles on my bottom axis which range from 1.012330801e+18 to 1.012330802e+18. What happens is my axis disappears when the number delta is very small.

    I have debugged the code and came across where the problem occurs and it is in QwtScaleArithmetic::ceilEps and QwtScaleArithmetic::floorEps.

    In that code, a qCeil/qFloor is called which converts the value into an integer before returning the value. This integer value will overflow causing the limits to be zero, thus no axis tick/label will be show. Changing the qCeil/qFloor to ceil and floor respectively seems to fix it.

    Since the two routines return a double anyway, was there a reason for using the integer version?


  2. #2
    Join Date
    Feb 2006
    Munich, Germany
    Thanked 856 Times in 805 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    MacOS X Unix/X11 Windows

    Default Re: Qwt axes and really small/large values

    I started to use the wrappers from qmath.h because of some platform incompatibilities ( most for symbian, where obviously nobody is interested in ). In case of qFloor/qCeil I simply missed the integer conversion, that of course is not intended.

    Fixed in SVN,

Similar Threads

  1. Replies: 0
    Last Post: 17th December 2010, 17:08
  2. Replies: 1
    Last Post: 4th November 2010, 07:00
  3. Zoom and pan with two y-axes
    By mjfj in forum Qwt
    Replies: 1
    Last Post: 19th October 2010, 10:39
  4. Sending large datagrams(very large)
    By marcel in forum General Programming
    Replies: 1
    Last Post: 16th February 2008, 21:55
  5. QGraphicsView and very small scale values
    By Vladimir in forum Qt Programming
    Replies: 4
    Last Post: 9th July 2007, 18:03


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.