开发者

moving graph using c++ and QWT

开发者 https://www.devze.com 2023-02-19 08:12 出处:网络
hello every one i want to ask that how can i plot a moving graph using qwt as i am new to qwt so i dont have any idea

hello every one i want to ask that how can i plot a moving graph using qwt as i am new to qwt so i dont have any idea

like i want a curve. my data is continuously coming.开发者_如何学Python that is i want two adjacent points to gradually join by curved line hope you people understands what i am trying to say is there any way to do this

kindly help me i will be very thank full to you people


Create a timer with 50ms period (25Hz frequency) and update the plot data on timers timeout signal.

EDIT: I looked at the QwtPlot closer. I assume that you use it with QwtPlotCurve. I think you can use its SetRawData method and every 50 miliseconds (or longer, depends on what you need) update your data arrays, then replot your graph with the replot method. Don't know if you have to invoke SetRawData on every update, according to Set Data description, you don't.

Or you can use AutoReplot. If you enable it with QwtPlot::setAutoReplot, invoking QwtPlotCurve::SetData with new data set should replot it automatically.

0

精彩评论

暂无评论...
验证码 换一张
取 消