From d215749168c4b91847c8182944db6b3ca303a26c Mon Sep 17 00:00:00 2001 From: Theo Heimel Date: Fri, 17 Mar 2023 17:51:42 +0100 Subject: [PATCH] more plotting improvements --- src/plots.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plots.py b/src/plots.py index ec80674..37c2242 100644 --- a/src/plots.py +++ b/src/plots.py @@ -640,7 +640,11 @@ def hist_plot( axs[1].axhline(y=0.8, c="black", ls="dotted", lw=0.5) if show_weights: - axs[1+int(show_ratios)].set_ylabel(r"$w$") + ax_idx = 1+int(show_ratios) + axs[ax_idx].set_ylabel(r"$w$") + axs[ax_idx].axhline(y=1, c="black", ls="--", lw=0.7) + ymin, ymax = axs[ax_idx].get_ylim() + axs[ax_idx].set_ylim(ymin, min(ymax, 2)) unit = "" if observable.unit is None else f" [{observable.unit}]" axs[-1].set_xlabel(f"${{{observable.tex_label}}}${unit}")