Results 1 to 5 of 5

Thread: QwtPlot issue under Win CE6

  1. #1
    Join Date
    Oct 2017
    Posts
    25
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default QwtPlot issue under Win CE6

    I have an application developed with Qwt 6.1.3 both for Windows 10 and Win CE6.
    Everything is ok with Windows 10, but under CE6 I see a strange behavior.

    When I plot data with setSamples()
    AND
    values for xData buffer are greater than 20.000.000 (more or less)
    AND
    the platform is Win CE6
    the plot is shown in a wrong way.

    What I see is "as if" the same value from xData buffer is used for 4 points:
    Qt Code:
    1. point #1 : x[0], y[0]
    2. point #2 : x[0], y[1]
    3. point #3 : x[0], y[2]
    4. point #4 : x[0], y[3]
    5. point #5 : x[4], y[4]
    6. point #6 : x[4], y[5]
    7. point #7 : x[4], y[6]
    8. point #8 : x[4], y[7]
    9. point #9 : x[8], y[8]
    10. point #10 : x[8], y[9]
    11. ...
    To copy to clipboard, switch view to plain text mode 

    Has someone seen something similar to this?
    Can you guess the reason?
    Is there a way to fix?

    THanks in advance

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

    Default Re: QwtPlot issue under Win CE6

    Maybe something related to the significance of floating points ?

    Uwe

  3. #3
    Join Date
    Oct 2017
    Posts
    25
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QwtPlot issue under Win CE6

    Do you mean something related to the approximation of floating point numbers when stored in binary representation?
    I think that in CE6 double means IEEE-754 32-bit floating point (on Win 10 is 64-bit), but it seems to me that for 20.000.000 the approximation error is less than 1.0.

    Do you mean something different?

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

    Default Re: QwtPlot issue under Win CE6

    No I meant exactly this - and the fact that you have 32-bit doubles points into this direction.

    I would use the debugger to find out, where things go wrong when translating from plot into paint device coordinates.
    Maybe start with checking QwtScaleMap::transform()

    HTH,
    Uwe

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

    vix (23rd November 2021)

  6. #5
    Join Date
    Oct 2017
    Posts
    25
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QwtPlot issue under Win CE6

    For numbers greater than 30.000.000,0 the error when storing them in IEEE-754 format is greather than 1,0.
    This is too much for my need and so I did it in a different way.
    I store the value for the first x element and I work with small delta values (1, 2, 3, ...).
    Then I use custom QwtDateScaleDraw to show the scale labels as I need.

Similar Threads

  1. Replies: 3
    Last Post: 20th July 2021, 18:29
  2. Issue with QwtPlot::setAxisScaleDiv();
    By icosahedron in forum Qwt
    Replies: 3
    Last Post: 28th December 2012, 20:35
  3. Replies: 9
    Last Post: 25th October 2012, 20:55
  4. Replies: 0
    Last Post: 15th May 2009, 16:12
  5. Replies: 6
    Last Post: 14th May 2009, 13:02

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.