Physics, Data Science, Least Squares, Chemometrics, Spectroscopy.
plt.plot(x_range, np.dot(cs,components), color = 'red', linewidth = 2, label = 'Calculation') # Plot the calculated spectrum for i in np.arange(len(cs)): plt.plot(x_range, cs[i]*components[i], label = 'c' + str(i)+ ' = ' + str(np.round(cs[i], 3))) plt.title('Mixture spectrum and calculated