In [5]:
%matplotlib inline
In [6]:
import matplotlib.pyplot as plt
import numpy as np
from ipywidgets import interact
from ipykernel.pylab.backend_inline import flush_figures
In [7]:
@interact(points=['-', '10', '20', '30'])
def render(points=None):
if points == '-': return
points = int(points)
fig, ax = plt.subplots()
x = np.random.randn(points)
y = np.random.randn(points)
ax.scatter(x, y)
flush_figures()