In [22]:
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
x = np.array([226, 248, 278, 369, 532, 718])
y = np.array([154, 155, 166, 219, 289, 314])
y = np.abs(y-350)
a,b,c,d,e = np.polyfit(x,y,4)
y2 = a*x**4+b*x**3+c*x**2+d*x+e
plt.xkcd() # Yes...
plt.plot(x,y2)
plt.axis([200,800,20,220])
plt.xlabel('T')
plt.ylabel('R')
plt.show()
In [ ]: