I have a python code in which I calculate a quantity for a large number of values of a parameter and then plot the quantity as a function of a parameter. Here is an example
t = np.linspace(1,100,10000)
q = np.zeros(10000)
for i in np.arange(10000)
q[i] = func(t[i])
plt.plot(t,q)
plt.show()
However I want that the plot to get dynamically updated such that every time a new element of the q
array is calculated it is added to the plot. How can I do that?