In [16]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from ipywidgets import interact

In [17]:
def sin(f):
    x = np.linspace(0, 5, 1000)
    y = np.sin(2*np.pi*f*x)
    plt.plot(x, y)

In [18]:
interact(sin, f=(0.0, 2.0))



In [ ]: