import numpy as np
import matplotlib.pyplot as plt
c = np.array([1e-6,2e-6,5e-6,8e-6,1e-5])
A = np.array([0.095,0.193,0.486,0.794,0.991])
a,b=np.polyfit(c,A,1)
print("Coeff dir=", a, "L/mol")
print("Ordonnée à l'origine=",b)
plt.plot(c,A,"o",label="Points expérimentaux")
plt.plot(c,a*c+b,"-", label="Droite de régression")
plt.xlabel("Concentration (mol/L)")
plt.ylabel("Absorbance")
plt.grid()
plt.legend()
plt.show()
To embed this project on your website, copy the following code and paste it into your website's HTML: