I'm completely new to matplotlib and decently experienced but rusty with python and I'm struggling to work with matplotlib currently. I'm trying to kind of animate a point on the plot, kind of like this: https://www.desmos.com/calculator/rv8gbimhon
I've written the code for it but the plot doesn't update the point in real time during the while loop, instead, the while loop is paused until I close the plot window and the next iteration of the loop happens, re-opening the plot with the updated coords. Is there a way to move a point on matplotlib without opening and closing windows?
My code:
import numpy as np import time t = 0 start_time = time.time() while t < 30: end_time = time.time() t = end_time - start_time print(t) plt.plot(t,t,"g^") plt.show()