import numpy as np
from scipy import interpolate
import matplotlib.pyplot as plt 

x = np.arange(0, 1.1, 0.1)
y = np.sin(4*np.pi*x)**2
plt.plot(x, y, 'o', label="sin^2(4*Pi*x)", c='k')
plt.xlabel('x')
plt.ylabel('y')
p10 = interpolate.lagrange(x, y)
xnew = np.arange(0,1.01, 0.01)
ynew = p10(xnew)   
plt.plot(xnew, ynew,label="Polynome Ordnung 10", linestyle='--', c='r') 
plt.legend(loc='lower right')
plt.show()