Open
Description
%matplotlib qt
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
import matplotlib.pyplot as plt
import numpy as np
def f(m, b):
plt.figure(2)
x = np.linspace(-10, 10, num=1000)
plt.plot(x, m * x + b)
plt.ylim(-5, 5)
plt.show()
interactive_plot = interactive(f, m=(-2.0, 2.0), b=(-3, 3, 0.5))
interactive_plot
This just plots all the lines in different colors in the same window. It seems it keeps a history of EVERY line and does not dynamically update the window.
Metadata
Metadata
Assignees
Labels
No labels