Feb-04-2023, 02:14 PM
(This post was last modified: Feb-04-2023, 02:14 PM by deanhystad.)
If you want your plot to update as points are added, use animation.
https://matplotlib.org/stable/api/animation_api.html
If you just want to make a plot, stop adding points in a loop. Make a list of points, and plot the list.
https://matplotlib.org/stable/api/animation_api.html
If you just want to make a plot, stop adding points in a loop. Make a list of points, and plot the list.
import matplotlib.pyplot as plt import math def get_data(t): return [math.sin(math.radians(deg)) for deg in range(t)] plt.plot(get_data(360)) plt.show()