Interactive matplotlib plots in jupyter notebook
<p>The following snippet works as expected in ipython console:</p>

<pre><code>&gt; anaconda3/bin/ipython3
In [1]: import matplotlib.pyplot as plt
        import pandas as pd
        import numpy as np
In [2]: plt.ion()
In [3]: pd.Series(np.sin(np.arange(0, 10, 0.1))).plot() # plot window appears
In [4]: pd.Series(np.cos(np.arange(0, 10, 0.1))).plot() # second line is drawn in the same window
</code></pre>

<p>At no point is the terminal blocked. How to get the same behavior in Jupyter notebook? That is, an external interactive plot window that can be drawn onto incrementally from the notebook.</p>

<p>The same snippet displays no plots from the notebook. Executing plt.show() will display external window, but will block execution until window is closed.</p>

<p>Thanks in advance.</p>