import numpy as np
import matplotlib.pyplot as plt
x=np.array([1,2,3,4,5,6])
def linear(a,b):
return a*x+b
plt.plot(x,linear(a,b))
plt.show()
linear(2,4)
It just gives me the output [6,8,10,12,14,16]
but not a plot. I cannot see what's wrong.