import sys import time from IPython.display import display, clear_output for i in range(10): time.sleep(0.25) clear_output(wait=True) print(i) sys.stdout.flush() from IPython import parallel rc = parallel.Client() view = rc.load_balanced_view() amr = view.map_async(time.sleep, [0.5]*100) amr.wait_interactive() %matplotlib inline import numpy as np import matplotlib.pyplot as plt from scipy.special import jn x = np.linspace(0,5) f, ax = plt.subplots() ax.set_title("Bessel functions") for n in range(1,10): time.sleep(1) ax.plot(x, jn(x,n)) clear_output(wait=True) display(f) # close the figure at the end, so we don't get a duplicate # of the last plot plt.close()