plt blocks on this call, which makes the example wait for you to close the window when running it manually.  I just thought it was taking a long time, until I realized.  I think both calls should be removed with a single call to plt.show() at the very end of the script.