From cfc43c3fc43a578968e0b47856b8865deac35258 Mon Sep 17 00:00:00 2001 From: Lorenz Gaertner Date: Mon, 2 Dec 2024 17:00:25 +0100 Subject: [PATCH] fix: truncate long 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},