2+2
4
from ipywidgets import StaticInteract, RangeWidget, RadioWidget
%matplotlib inline
from matplotlib import pyplot as plt
import numpy as np
def quadr_func(a,b):
fig = plt.figure()
x = np.linspace(-2,2,20)
y = a*x**2+b*x
ax = fig.add_subplot(111)
ax.plot(x, y)
return fig
StaticInteract(quadr_func, a=RangeWidget(-1,1,0.55),
b=RangeWidget(-1,1, 0.55))