I want to plot a real-time graph in matplot
lib with a limited number of X axis values (say 10).
My current graph does not do that and instead compresses the entire graph. When i get my 11th value, I want my 1st value to be wiped off. any ideas? I was thinking of using a cyclic queue, but do not know where and how to start.
My current code (dummy data) is:
for i in range(0,100): #time
time.sleep(0.1)
for s in range(0,sensors):
x[s].append(random.randint(20,80))
drawnow(makePlot)