How to use numpy arrays for plotting live data, fast?

Viewed 30

I have some sensor input that arrives around seven times a second. I need to plot that in nine graphs. So I wrote a program using matplotlib and lists which was horrendously slow - I could get 1-2 updates a second, not nearly fast enough.

So I started to consider numpy. According to this, using nympy arrays should be a lot faster than lists, especially if one declares a fixed size from the get to.

My problem: When the list reaches e.g. 100 data points, I need to "move along" the data, so new data is appended on the right, and the old data is lost behind the y-axis on the left. This was done with lists using .append and .pop(0), but numpy arrays don't do that. So how do I maintain nine numpy arrays that all need to "follow along" in the plot?

0 Answers
Related