guess2 = [0.49, 0.55, 0.01, 1, 0.64, 0.01, 0]
optim3, success = optimize.leastsq(errfunc3, guess3[:], args=(data[:, (0)],
    data[:, (1)]))
optim2, success = optimize.leastsq(errfunc2, guess2[:], args=(data[:, (0)],
    data[:, (1)]))
optim3
plt.plot(data[:, (0)], data[:, (1)], lw=5, c='g', label='measurement')
plt.plot(data[:, (0)], three_gaussians(data[:, (0)], *optim3), lw=3, c='b',
    label='fit of 3 Gaussians')
plt.plot(data[:, (0)], two_gaussians(data[:, (0)], *optim2), lw=1, c='r',
    ls='--', label='fit of 2 Gaussians')
plt.legend(loc='best')
plt.savefig('result.png')
Python-load data and do multi Gaussian fit