# Interactive Function Plot
This notebook demonstrates an interactive plot using `ipywidgets` and `matplotlib` where the parameters of the function can be adjusted with sliders.
import numpy as npimport matplotlib.pyplot as pltfrom ipywidgets import interact# Define the function to visualizedef plot_function(a, b): x = np.linspace(0, 10, 100) y = a * np.sin(b * x) plt.figure(figsize=(8, 4)) plt.plot(x, y) plt.title(f'Plot of y = {a} * sin({b} * x)') plt.xlabel('x') plt.ylabel('y') plt.grid(True) plt.show()# Create interactive sliders for 'a' and 'b' parametersinteract(plot_function, a=(0.1, 5.0, 0.1), b=(0.1, 5.0, 0.1))