import matplotlib.pyplot as plt %pylab inline import pandas as pd from scipy.interpolate import KroghInterpolator from scipy.interpolate import BarycentricInterpolator
df=pd.DataFrame({'x': [-15.8,0.,19.8], 'y': [-12.,10.,12.]})
plt.plot(df.x,df.y,'bo') plt.grid()
I=KroghInterpolator(df.x,df.y)
X=np.linspace(-20,35) plt.plot(df.x,df.y,'bo') plt.plot(X,I(X)) plt.grid()