I want to show image during for iterations.
I encountered empty initial figure is generated during running.
however if i stop running the image appears.
What the problem is? I am using python 3.6.
plt.ion() # turn on interactive mode, non-blocking `show`
for loop in range(0, 3):
y = np.dot(x, loop)
plt.figure() # create a new figure
plt.plot(x, y) # plot the figure
plt.show() # show the figure, non-blocking
_ = input("Press [enter] to continue.") # wait for input from the user
plt.close()