vix
15th September 2021, 09:13
Hello,
I need to implement a time-series plot (i.e. a plot where every second one new sample is added to a curve).
When the curves contains more than a given number of samples (as an example 100), the x-scale is set so that only the most recent 100 samples are shown.
I did this calling
QwtPlotCurve::setSamples() after I get every new sample, and setting the whole time-history.
I set the x-scale when it's necessary.
But I wonder if there is a better way (maybe appending a new sample to an existing curve).
Thanks in advance
I need to implement a time-series plot (i.e. a plot where every second one new sample is added to a curve).
When the curves contains more than a given number of samples (as an example 100), the x-scale is set so that only the most recent 100 samples are shown.
I did this calling
QwtPlotCurve::setSamples() after I get every new sample, and setting the whole time-history.
I set the x-scale when it's necessary.
But I wonder if there is a better way (maybe appending a new sample to an existing curve).
Thanks in advance