PDA

View Full Version : qwt Scale



David812
23rd May 2011, 15:15
:confused:
Good Morning Everybody,
i'm developping an application to plot some data in real time coming from an A/D device.
I solved the issue related to implement an incremental plot by means of QwtPlotDirectPainter::drawSeries.
Now i've the problem to update the x axis so that for each new drawn sample the scale is updated accordingly without needing to replot everything(incremental scale update).

Any suggestion are welcome.
Andrea

Uwe
23rd May 2011, 16:20
Now i've the problem to update the x axis so that for each new drawn sample the scale is updated accordingly without needing to replot everything(incremental scale update)
As soon as you are changing the scales you have to replot.

Uwe

David812
24th May 2011, 08:06
Hello Uwe,
just to sum up....
are You saying there isn't a way to update the x axis ticks without to replot anything?

I think doing that i can only update the x axis when i totally filled the available range (let's say 1 or 2 seconds of simulation) then to erase the signal history and translate the signal towards left for ex.
Am i in wrong?

Thanks in advance Uwe and sorry for my english :)

Uwe
24th May 2011, 08:43
As soon as you change the transformation ( scale ranges/canvas size ) or you need to erase something from the plot canvas you have to repaint it. What repainting means might depend.

But before you continue with your code have a look at the refreshtest example. Its purpose is to show what refresh rates are possible on a particular hardware and what parameters have which impact on the performance. F.e. on my box ( an Atom board on X11 ) I can see about 70 fps for a plot with a curve of 20000 points.

Another example you could check is the oscilloscope. Because it doesn't update the scales for every point it can paint incrementally on top of the existing scene and you get extremely high update rates.

Uwe