In [1]:
from IPython.html.widgets import interact
:0: FutureWarning: IPython widgets are experimental and may change in the future.
In [2]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
In [3]:
def plot_sine(n,c):
    print(n)
    x = np.arange(0, 20, 0.1);
    y = np.sin(x/n+c)
    plt.plot(x, y)
In [4]:
interact(plot_sine, n=(1,10, 0.1),c=(-10,10,.1))
4.9