I am trying to plot a graph for the data being produced using the following code.
import time
import random
import datetime
mylist = []
ct = datetime.datetime.now()
for i in range(0,61):
x = random.randint(1,100)
mylist.append(x)
if len(mylist) == 11:
right_in_left_out = mylist.pop(0)
else:
right_in_left_out = None
print(mylist)
time.sleep(1)
I want the graph to show real time plotting and at one time only 10 points should be plotted. The graph should keep moving forward just like how to data is being printed. Almost like an animation.