Hello i’m trying to real time plot inside a program made with qt
the line are this:
def on_line(self):
fig = plt.figure()
ax = fig.add_subplot(1, 1 , 1)
lista_x_vals = []
lista_y_vals = []
def animate(self, i):
lista_y_vals.append(self.y_vals)
lista_x_vals.append(self.x_vals)
ax.clear()
ax.plot(lista_y_vals, lista_x_vals)
ani = FuncAnimation(fig, animate, fargs = (lista_y_vals, lista_x_vals), interval = 500)
plt.show()
but from what i understand the animate function is not called, can you help me to solve the problem
thanks in advance