<div dir="ltr"><div>A cute small example that combines interact and mpld3 zoom/pan. Works with the current release of ipython-2.1.0, matplotlib-1.3.1 and mpld3-0.3.<br>It'd be great, if functionality that allows this example to work would stay and remain operational...<br>

<br><span style="font-family:courier new,monospace"><br></span></div><div><span style="font-family:courier new,monospace"><br>%matplotlib inline<br>import matplotlib.pyplot as plt, numpy as np<br>from IPython.html import widgets<br>

<br>import mpld3         # Notice that as you hover over the plot, a toolbar appears in the lower left. <br>mpld3.enable_notebook()<br><br>def on_value_change(value):<br>    fig, ax = plt.subplots()<br>    x, y = np.random.normal(size=(2, 100))<br>

    color, size = np.random.random((2, 100))<br><br>    ax.scatter(x[:value], y[:value], c=color[:value], s=500 * size, alpha=0.3)<br>    ax.axis((-3,3,-3,3))<br>    ax.grid(color='lightgray', alpha=0.7)<br><br><br>

widgets.interact(on_value_change, value = widgets.IntSliderWidget(min=1, value=20))    <br></span><br><br><br><br></div><div>With Regards,<br></div><div>Dmitry<br></div><div><br></div></div>