I am using QWT 6 and I am trying to plot some dots every second. To do that I use the following code:
d_plot_dots->setRawSamples(_realDataPoints, _imagDataPoints, size);
plot->replot();
I want to support a hold on option, so dots from previous seconds to be still visible at the plot. One solution to this is to resize every second the arrays that hold the points, append the new values and call again the setRawSamples() and the replot(), but this solution is not memory efficient as at every seconds I have to store at least 2 * 2048 points.
Is there any, more efficient way?
Thanks in advance!
The solution to that was the use of directPainter.
Following the realtime example of the QWT I done the following:
First I created the helper class CurveData.
And then at my plotting code:
And the hold on effect with minimum memory consumption is ready!