c++ - Real time plotting/data logging -
I am going to write a program that plots data from a computer connected sensor. The value of the sensor is being prepared as a function of time (the value of the sensor on the y-axis, time on the x-axis). I want to add new values to the plot in real time. What would be best to do this with C ++?
Edit: And by the way, the program will be running on a Linux machine
Write a task that you can like in std :: deque
, then .push_back ()
on the line from the value sensor, as it becomes available , And .pop_front ()
the value from the queue if it becomes too long to create good plot.
The exact nature of your plotting depends on your platform, needs, sense of aesthetics, etc.
Comments
Post a Comment