hello, i want to plot an online data. max data point that would be shown in screen is 500,000. every data packet has 500 point. So 1000 packet is needed to once full the screen. packet arrival is 10 ms.
for updating this, what i know is that there are 2 strategy:
1- add all data to one graph in one layer and use
my_plot->replot(); and at the end of screen clear data with
my_plot->graph(0)->data()->clear(); and again add data ...
2-take each packet in a separate graph in separate layer and at every packet receiving, clear that graph's data and add new packet to that specified graph and use
first strategy has 2 problem: speed reducing when it approaching the end of screen(for reploting big amount of data) and second problem is that plot is not continuous (for at end of screen all data should be cleared).
second strategy also has problem of speed. when i add only 20 layer(i need 1000 layer!) the delay for each packet plotting is near 25 ms!( even if i only use one layer).
what is the best way for updating fast and continuously this plot?