QwtPlotCurve not plotting dots for milliseconds
Hello,
I have a graph that plotting data in terms of dots (y is const) on the x-axis. but its plotting dots only for integer(seconds) values not for double(milliseconds).
I read that, I need to overload draw function, but I didn't understand how it will help me.
Please give me some suggestions.
Thanks
Re: QwtPlotCurve not plotting dots for milliseconds
Qwt knows about x and y coordinates in doubles. Whatever you are doing with seconds/milliseconds - it is probably some sort of logic, that is implemented in application code.
Uwe
Re: QwtPlotCurve not plotting dots for milliseconds
Yes, I just want to know in which method should I dig for this and what things will help me in what way?
I'm not asking for complete logic, but just guidance to do that.
The confusion is because if I think to overload below method,
Code:
{
qDebug()<<canvasRect<<from<<to;
QwtPlotCurve::drawDots(p, xMap, yMap, canvasRect, from, to
);
}
Then we can find from and to are integer. So for any logic, it will not accept double values or either convert it to an integer.
Now QPainter object, this will only paint the points from-to, so which things will help here or is there any other method to accept logic for double?
Thanks
Re: QwtPlotCurve not plotting dots for milliseconds
QwtPlotCurve represents an array of points ( QPointF ) and from/to are indexes related to this array - no values.
Uwe
Re: QwtPlotCurve not plotting dots for milliseconds
I have tried this one, like adding points 1,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0. I have used setSamples(points) in which I have added all those values.
But in the end its only plotting dots for 1 and 2. I have tried to print all values of that array(points) and I can see those values but still, it's not working.
So why it's not accepting those double values here?
Thanks
Added after 1 37 minutes:
Sorry, it's my mistake, I have use int while passing double value to setSamples().
Now it's working fine for milliseconds too.
Thanks for patience.