Mar-14-2022, 04:53 PM
(Mar-14-2022, 04:06 PM)deanhystad Wrote: _x is a numpy array. _y is a single number. Do you want to evaluate m_val*x_val+c_val for each value in _x?
import numpy as np import matplotlib.pyplot as plt slope = 2 offset = 3 x = np.linspace(-5,5,100) y = x * slope + offset plt.plot(x, y) plt.show()
Well no.
I want it to be readable and accurate enough, any ideas?