pylab.ion()
tst_xdata = [1, 2, 3, 4, 5, 6]
tst_ydata = [1, 1, 1, 1, 1, 1]
pylab.plot(tst_xdata, tst_ydata)
pylab.draw()
pdb.set_trace()
for idx in range(3):
    tst_ydata = [(elem + 2) for elem in tst_ydata]
pylab.plot(tst_xdata, tst_ydata)
pylab.draw()
pylab.show()
How do I force Matplotlib to draw while in the ipdb debugger in Spyder (or any other debugger)?