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:
Code:
point #1 : x[0], y[0]
point #2 : x[0], y[1]
point #3 : x[0], y[2]
point #4 : x[0], y[3]
point #5 : x[4], y[4]
point #6 : x[4], y[5]
point #7 : x[4], y[6]
point #8 : x[4], y[7]
point #9 : x[8], y[8]
point #10 : x[8], y[9]
...
Has someone seen something similar to this?
Can you guess the reason?
Is there a way to fix?
THanks in advance
Re: QwtPlot issue under Win CE6
Maybe something related to the significance of floating points ?
Uwe
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?
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
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.