I'm trying to plot some data, however it's not plotting. When I run my code, it just says "process finished", with no plot showing up. I'm really not sure what I'm doing wrong here. Any advice on how to fix this?
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from random import randint
import time
import datetime
Time = time.time()
fig = plt.figure()
x = []
y = []
def rand_num():
while True:
n = randint(1, 1000)
n1 = randint(1, 1000)
n2 = randint(1, 1000)
def animate(i):
x.append(time.time())
# print(Time)
y.append(n)
# print(n)
plt.plot(x, y, color='r')
# plt.plot(x, n1, color='g')
# plt.plot(x, n2, color='b')
euler = []
return
anim = animation.FuncAnimation(fig, animate, interval=1000)
plt.show()

