From 181fab6acf4e95abb1e2c487ff48c83eb9d8ee1f Mon Sep 17 00:00:00 2001 From: Alice BRENON <alice.brenon@ens-lyon.fr> Date: Thu, 21 Mar 2024 16:56:22 +0100 Subject: [PATCH] Preserve label orders when trimming them --- GEODE/Visualisation/Legend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GEODE/Visualisation/Legend.py b/GEODE/Visualisation/Legend.py index 7aa292e..9403bc2 100644 --- a/GEODE/Visualisation/Legend.py +++ b/GEODE/Visualisation/Legend.py @@ -20,4 +20,4 @@ def trim(labels, maxWidth=10): else: shards = [label.split(' ') for label in labels] prefixes = [*map(take(maxWidth), shards)] - return [' '.join(prefix) for prefix in sorted(prefixes)] + return [' '.join(prefix) for prefix in prefixes] -- GitLab