From 0ce3b1dd9b3e776b1baca7d96d4d95124c922bf2 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..de280103 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, + (label[:30] + "...") if len(label) > 30 else label, loc="upper left", frameon=False, prop={"fontsize": "large", "linespacing": 1.5},