diff options
| author | tlatorre <tlatorre@uchicago.edu> | 2020-09-16 10:37:23 -0500 | 
|---|---|---|
| committer | tlatorre <tlatorre@uchicago.edu> | 2020-09-16 10:37:23 -0500 | 
| commit | 1cc5fc8014ab75ac55672aa962228ac54ae8d9db (patch) | |
| tree | c3490742679196b35561b2a1496dde0dac88e37f /utils/plot-muons | |
| parent | e9a15c52a88b86188c60cd423f9266a45a1701d6 (diff) | |
| download | sddm-1cc5fc8014ab75ac55672aa962228ac54ae8d9db.tar.gz sddm-1cc5fc8014ab75ac55672aa962228ac54ae8d9db.tar.bz2 sddm-1cc5fc8014ab75ac55672aa962228ac54ae8d9db.zip | |
update plot-muons to plot bias and resolution with fmt='o'
Diffstat (limited to 'utils/plot-muons')
| -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)") | 
