for i in range(3):
print("Info ",i)
plt.figure()
plt.plot(np.arange(10)*(i+1))
In an IPython Notebook, this will first print out the three info messages, and afterwards plot the three figures.
Which command can I use to enforce the sequential display of prints and plots? That is, print "Info 0", plot "Figure 0", print "Info 1", plot "Figure 1", etc.
This a simple bare-bones example. In my case it's much more complicated, and it's important to get the behavior correctly.