Skip to content
Snippets Groups Projects
Commit a6ef3dfb authored by Günter Quast's avatar Günter Quast
Browse files

nicer kafe2 graphics

parent 4086d504
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,7 @@ for i, p in enumerate(peaks):
bins = range(mn, mx+1)
counts = hst[mn : mx]
hfit_data = HistContainer(bin_edges = bins)
hfit_data.label="peak " + str(i)
hfit_data.label="peak " + str(i+1)
hfit_data.set_bins(counts)
#Fit
fit = HistFit(data = hfit_data, model_function = gauss_plus_bkg, density=False)
......@@ -220,12 +220,15 @@ if plot:
linewidth=1, linestyle='dashed', color='goldenrod')
ax1.hlines(mx-h/2, mu-fwhm/2, mu+fwhm/2,
linewidth=2, color='goldenrod')
ax1.hlines(mx-h, mu-fwhm/4, mu+fwhm/4,
linewidth=3, color='goldenrod')
ax1.legend(loc = 'best')
if kafe2_plots:
# kafe2 plots
fit_results = np.append(fit_results, hdata)
p = Plot(fit_results)
p.customize('data', 'alpha', [(i, 0.25) for i in range(len(peaks))]+[(len(peaks), 0.05)])
p.plot()
plt.show()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment