I have a subplot in python matplotlib,and I want to determine the other subplot based on observations of this subplot. I want to see two subplots, one empty, and after observing the nonempty one, determine an input, input it from the keyboard and have the second subplot generated in the empty space next to the first one. Also maybe do this multiple times reusing the initially empty subplot. What is the best way to do this kind of interactive plot
subplot(1,2,1)
plt.plot(x_range,points,'o')
plt.subplot(1,2,2)
#maybe plot some prompt in the second subplot
plt.show()
#proceed, clean plot
subplot(1,2,1)
plt.plot(x_range,points,'o')
point_chosen = input("choose a point: ")
#checking validity
plt.bar(range(x), y(point_chosen))
plt.show()
I didn't manage to stop the plot as well, plt.show() was blocking. If I used plot.ion() at the beginning it would immediately close the plotting windows.