Tips (Utility, Computer Language, and etc.)
[python] plot during simulation
Struggler J.
2018. 12. 4. 20:25
[ref]
https://stackoverflow.com/questions/23141452/difference-between-plt-draw-and-plt-show-in-matplotlib
# main loop
for t in range(10000):
bk += dt*eom(temp_bk)
t += dt
#plot
if time%1000==0:
plt.axis([100, 300, 0, 0.2])
plt.plot(bk)
plt.pause(0.05)
plt.show()