I would like to find the mathematical function that could approximately fit all of the following points :
x = [560, 387, 280, 231, 196, 168, 148, 136, 124, 112, 104, 101, 93, 88, 84, 80, 76]
y = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90]
coefficients = np.polyfit(x, y, len(x) - 1)
polynomial = np.poly1d(coefficients)
But if I test this polynomial, I get wrong values :
x1 = []
y1 = []
for i in range(276, 570, 1):
x1.append(i)
y1.append(polynomial(i))
plt.figure(figsize=(12,6))
plt.plot(x1, y1, 'o')
plt.show()