Running following code in an ipython/jupyter notebook:
for i in range(4):
# any figure
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(range(i), range(i))
fig.show()
# do something that takes a long time:
a = fib(500000)
results in all the figures being visible at the same time (after the 4th loop).
How can I change my setup so that the figures become visible as soon as they have been calculated (before the next step in the for loop)?
N.B. I'm using %matplotlib inline