diff options
-rwxr-xr-x | utils/plot-muons | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/plot-muons b/utils/plot-muons index 45139a7..25e7d24 100755 --- a/utils/plot-muons +++ b/utils/plot-muons @@ -267,12 +267,12 @@ if __name__ == '__main__': print("Data energy bias = %.2f +/- %.2f" % (mean, std)) fig, (a0, a1) = plt.subplots(2, 1, gridspec_kw={'height_ratios': [3, 1]}) - a0.errorbar(T, dT['median']*100/T, yerr=dT['median_err']*100/T, color='C0', label="Data") - a0.errorbar(T, dT_mc['median']*100/T, yerr=dT_mc['median_err']*100/T, color='C1', label="Monte Carlo") + a0.errorbar(T, dT['median']*100/T, yerr=dT['median_err']*100/T, fmt='o', color='C0', label="Data") + a0.errorbar(T, dT_mc['median']*100/T, yerr=dT_mc['median_err']*100/T, fmt='o', color='C1', label="Monte Carlo") despine(ax=a0,trim=True) a0.set_ylabel(r"Energy bias (\%)") a0.legend() - a1.errorbar(T, dT['median']*100/T-dT_mc['median']*100/T, yerr=np.sqrt((dT['median_err']*100/T)**2+(dT_mc['median_err']*100/T)**2), color='C0') + a1.errorbar(T, dT['median']*100/T-dT_mc['median']*100/T, yerr=np.sqrt((dT['median_err']*100/T)**2+(dT_mc['median_err']*100/T)**2), fmt='o', color='C0') a1.hlines(mean,T[0],T[-1],linestyles='--',color='r') a1.set_ylim(0,25) despine(ax=a1,trim=True) @@ -292,12 +292,12 @@ if __name__ == '__main__': print("Data energy resolution = %.2f +/- %.2f" % (mean, std)) fig, (a0, a1) = plt.subplots(2, 1, gridspec_kw={'height_ratios': [3, 1]}) - a0.errorbar(T, dT['iqr_std']*100/T, yerr=dT['iqr_std_err']*100/T, color='C0', label="Data") - a0.errorbar(T, dT_mc['iqr_std']*100/T, yerr=dT_mc['iqr_std_err']*100/T, color='C1', label="Monte Carlo") + a0.errorbar(T, dT['iqr_std']*100/T, yerr=dT['iqr_std_err']*100/T, fmt='o', color='C0', label="Data") + a0.errorbar(T, dT_mc['iqr_std']*100/T, yerr=dT_mc['iqr_std_err']*100/T, fmt='o', color='C1', label="Monte Carlo") a0.set_ylabel(r"Energy resolution (\%)") despine(ax=a0,trim=True) a0.legend() - a1.errorbar(T, dT['iqr_std']*100/T-dT_mc['iqr_std']*100/T, yerr=np.sqrt((dT['iqr_std_err']*100/T)**2+(dT_mc['iqr_std_err']*100/T)**2), color='C0') + a1.errorbar(T, dT['iqr_std']*100/T-dT_mc['iqr_std']*100/T, yerr=np.sqrt((dT['iqr_std_err']*100/T)**2+(dT_mc['iqr_std_err']*100/T)**2), fmt='o', color='C0') a1.hlines(mean,T[0],T[-1],linestyles='--',color='r') despine(ax=a1,trim=True) a1.set_xlabel("Kinetic Energy (MeV)") |