#!/usr/bin/env python # coding: utf-8 # In[1]: from IPython.html.widgets import interact # In[2]: get_ipython().run_line_magic('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))