From cd0af1b7d30b17b5dfbe6e4df6bea19f769441a7 Mon Sep 17 00:00:00 2001 From: Lorenz Gaertner Date: Mon, 2 Dec 2024 17:54:24 +0100 Subject: [PATCH] fix: truncate long channel names on data_mc plots (#496) * only show first 30 characters of channel names on data/MC plots --- src/cabinetry/visualize/plot_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cabinetry/visualize/plot_model.py b/src/cabinetry/visualize/plot_model.py index 10eb0673..2e16bcd3 100644 --- a/src/cabinetry/visualize/plot_model.py +++ b/src/cabinetry/visualize/plot_model.py @@ -223,7 +223,7 @@ def data_mc( # figure label (region name) at = mpl.offsetbox.AnchoredText( - label, + f"{label[:30]}..." if len(label) > 30 else label, loc="upper left", frameon=False, prop={"fontsize": "large", "linespacing": 1.5},