guess = [1, 200, 1000, 7, 0.05, 1000, 6.85, 0.05, 400, 7, 0.6]
popt, pcov = curve_fit(composite_spectrum, x2, y2, p0=guess)
plt.plot(x2, composite_spectrum(x2, *popt), 'k', label='Total fit')
plt.plot(x2, func(x2, *popt[-3:]) + x2 * popt[0] + popt[1], c='r', label=
    'Broad component')
FWHM = round(2 * np.sqrt(2 * np.log(2)) * popt[10], 4)
plt.axvspan(popt[9] - FWHM / 2, popt[9] + FWHM / 2, facecolor='g', alpha=
    0.3, label='FWHM = %s' % FWHM)
plt.legend(fontsize=10)
plt.show()
Gaussian Fit on noisy and 'interesting' data set