diff --git a/benchmarks/backgrounds/ecal_backwards.org b/benchmarks/backgrounds/ecal_backwards.org index 25ded18803163f8c442c9510dcf80ed0b7461a18..ef7e20563023184a7de0632cfcd3e1a311697b78 100644 --- a/benchmarks/backgrounds/ecal_backwards.org +++ b/benchmarks/backgrounds/ecal_backwards.org @@ -42,6 +42,8 @@ def setup_presentation_style(): 'legend.loc': 'upper right', 'xtick.labelsize': 8, 'ytick.labelsize': 8, + 'xaxis.labellocation': 'right', + 'yaxis.labellocation': 'top', 'pgf.rcfonts': False, }) @@ -232,8 +234,8 @@ for collection_name in ["EcalEndcapNHits", "EcalEndcapPHits"]: ) plt.colorbar().set_label("energy, GeV", loc="top") plt.title(f"{label}, event_id={event_id}\n{collection_name}") - plt.xlabel("hit x, mm", loc="right") - plt.ylabel("hit y, mm", loc="top") + plt.xlabel("hit x, mm") + plt.ylabel("hit y, mm") plt.savefig(output_dir / f"{collection_name}_event_display_{dataset_ix}.png", bbox_inches="tight") plt.show() plt.clf() @@ -286,9 +288,9 @@ for collection_name in ["EcalEndcapNHits", "EcalEndcapPHits"]: plt.title(f"{collection_name}") plt.legend() - plt.xlabel("r, mm", loc="right") + plt.xlabel("r, mm") dr = (r_axis.edges[1] - r_axis.edges[0]) - plt.ylabel(f"Number of towers per {dr} mm slice in $r$", loc="top") + plt.ylabel(f"Number of towers per {dr} mm slice in $r$") plt.savefig(output_dir / f"{collection_name}_num_towers.png", bbox_inches="tight") plt.show() plt.clf() @@ -326,8 +328,8 @@ for collection_name in ["EcalEndcapNHits", "EcalEndcapPHits"]: plt.title(f"for $E_{{dep.}} >$ {edep_min * 1000} MeV\n{collection_name}") plt.legend() - plt.xlabel("r, mm", loc="right") - plt.ylabel("rate per tower, Hz", loc="top") + plt.xlabel("r, mm") + plt.ylabel("rate per tower, Hz") plt.yscale("log") plt.savefig(output_dir / f"{collection_name}_hit_rate_vs_r_edep_min_{edep_min:.3f}.png", bbox_inches="tight") plt.show() @@ -357,8 +359,8 @@ for collection_name in ["EcalEndcapNHits", "EcalEndcapPHits"]: plt.title(rf"for events with $E_{{\mathrm{{dep. tot.}}}}$ $>$ {totedep_min} GeV" + f"\n{collection_name}") plt.legend() - plt.xlabel("$z$ of the first interaction vertex, mm", loc="right") - plt.ylabel("rate, Hz", loc="top") + plt.xlabel("$z$ of the first interaction vertex, mm") + plt.ylabel("rate, Hz") plt.yscale("log") plt.savefig(output_dir / f"{collection_name}_hit_rate_vs_z_totedep_min_{totedep_min:.1f}.png", bbox_inches="tight") plt.show() @@ -438,7 +440,7 @@ for edep_min in [0]: # GeV plt.sca(ax_cur) plt.legend() plt.title(f"for $E_{{dep.}} >$ {edep_min * 1000} MeV") - plt.ylabel("rate, Hz", loc="top") + plt.ylabel("rate, Hz") plt.yscale("log") plt.xticks(rotation=90, ha='right') fig_cur.savefig(f"rates_edep_min_{edep_min}_{dataset_ix}.png", bbox_inches="tight") @@ -448,7 +450,7 @@ for edep_min in [0]: # GeV plt.sca(ax_cmb) plt.legend() plt.title(f"for $E_{{dep.}} >$ {edep_min * 1000} MeV") - plt.ylabel("rate per tower, Hz", loc="top") + plt.ylabel("rate per tower, Hz") plt.yscale("log") plt.xticks(rotation=90, ha='right') fig_cmb.savefig(f"rates_edep_min_{edep_min}.png", bbox_inches="tight") diff --git a/benchmarks/backwards_ecal/backwards_ecal.org b/benchmarks/backwards_ecal/backwards_ecal.org index 7044c77f061f6607245e1213384af6c66ed5602d..d3ffca5e4408da4030d929878c1767842ed1dd46 100644 --- a/benchmarks/backwards_ecal/backwards_ecal.org +++ b/benchmarks/backwards_ecal/backwards_ecal.org @@ -43,6 +43,8 @@ def setup_presentation_style(): 'legend.fontsize': 7, 'xtick.labelsize': 8, 'ytick.labelsize': 8, + 'xaxis.labellocation': 'right', + 'yaxis.labellocation': 'top', 'pgf.rcfonts': False, }) @@ -149,8 +151,8 @@ for ix, energy in enumerate(energies): plt.hist(pi_pred, weights=np.full_like(pi_pred, 1.0 / ak.num(pi_pred, axis=0)), bins=np.linspace(0., 1.01, 101), label=rf"$\pi^-$ {clf_label}", histtype="step") plt.title(f"{energy}") plt.legend() - plt.xlabel("Classifier output", loc="right") - plt.ylabel("Event yield", loc="top") + plt.xlabel("Classifier output") + plt.ylabel("Event yield") if do_log: plt.yscale("log") @@ -170,8 +172,8 @@ for ix, energy in enumerate(energies): plt.yscale("log") plt.title(f"{energy}") plt.legend(loc="lower left") - plt.xlabel("Electron efficiency, %", loc="right") - plt.ylabel("Pion rejection factor", loc="top") + plt.xlabel("Electron efficiency, %") + plt.ylabel("Pion rejection factor") fig.savefig(output_dir / f"pred.pdf", bbox_inches="tight") plt.close(fig) @@ -191,8 +193,8 @@ for clf_label, roc in rocs.items(): plt.yscale("log") plt.title(INPUT_PATH_FORMAT) plt.legend() -plt.xlabel("Energy, GeV", loc="right") -plt.ylabel("Pion rejection at 95%", loc="top") +plt.xlabel("Energy, GeV") +plt.ylabel("Pion rejection at 95%") plt.savefig(output_dir / f"pion_rej.pdf", bbox_inches="tight") plt.show() #+end_src diff --git a/benchmarks/ecal_gaps/ecal_gaps.org b/benchmarks/ecal_gaps/ecal_gaps.org index 8b227b15a63ed14dece3fc51bf530e8ec37bae90..465120901265759534d27ed5359633e6f4a109e3 100644 --- a/benchmarks/ecal_gaps/ecal_gaps.org +++ b/benchmarks/ecal_gaps/ecal_gaps.org @@ -39,6 +39,8 @@ def setup_presentation_style(): 'legend.fontsize': 7, 'xtick.labelsize': 8, 'ytick.labelsize': 8, + 'xaxis.labellocation': 'right', + 'yaxis.labellocation': 'top', 'pgf.rcfonts': False, }) @@ -153,8 +155,8 @@ for energy in ["500MeV", "5GeV", "20GeV"]: std = np.sqrt(profile.variances()) cond = profile.values() > std plt.errorbar(profile.axes[0].centers[cond], profile.values()[cond], yerr=std[cond], marker=".", markersize=2, color="black", ls="none", lw=0.6, capsize=1.) - plt.xlabel(r"$\eta_{thrown}$", loc="right") - plt.ylabel(r"$\sum E_{\mathrm{dep.}} / p_{\mathrm{thrown}}$", loc="top") + plt.xlabel(r"$\eta_{thrown}$") + plt.ylabel(r"$\sum E_{\mathrm{dep.}} / p_{\mathrm{thrown}}$") plt.title(f"{energy} {particle} in {calo_name}") plt.minorticks_on() plt.savefig(output_dir / f"ecal_gap_{particle}_{energy}_{calo_name}.png", bbox_inches="tight") @@ -211,8 +213,8 @@ for energy in ["500MeV", "5GeV", "20GeV"]: std = np.sqrt(profile.variances()) cond = profile.values() > std plt.errorbar(profile.axes[0].centers[cond], profile.values()[cond], yerr=std[cond], marker=".", markersize=2, color="black", ls="none", lw=0.6, capsize=1.) - plt.xlabel(r"$\eta_{thrown}$", loc="right") - plt.ylabel(r"$\sum E_{\mathrm{dep.}} / p_{\mathrm{thrown}}$", loc="top") + plt.xlabel(r"$\eta_{thrown}$") + plt.ylabel(r"$\sum E_{\mathrm{dep.}} / p_{\mathrm{thrown}}$") plt.title(f"{energy} {particle}\n" + "+".join(calos)) plt.minorticks_on() plt.savefig(output_dir / f"ecal_gap_{particle}_{energy}_sum_all.png", bbox_inches="tight")