import ipywidgets as wgt
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
def f(a,b,c):
x = np.linspace(0,10,1000)
y = np.cos(a*x + b) + c
plt.plot(x,y)
plt.ylim([-3,3])
plt.show()
wgt.interact(f, a=(-5,5,3), b=(-5,5), c=(-6,6)); # try adding string and list arguments...
interactive(children=(IntSlider(value=-2, description='a', max=5, min=-5, step=3), IntSlider(value=0, descript…
def f(m, b):
x = np.linspace(-10, 10, num=1000)
y = m*x + b
plt.plot(x, y)
plt.ylim(-5,5)
plt.show()
interactive_plot = wgt.interactive(f, m=(-2.0, 2.0), b=(-3, 3, 0.5))
interactive_plot
interactive(children=(FloatSlider(value=0.0, description='m', max=2.0, min=-2.0), FloatSlider(value=0.0, descr…