From 5fd10a24a3b69cdb64a4b38b13da5dbf54ed92b7 Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Mon, 31 Mar 2025 23:03:23 -0400 Subject: [PATCH] Add #/5 text to categorical legends --- lib/xmet/spc.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/xmet/spc.py b/lib/xmet/spc.py index 71939a8..4773ba8 100644 --- a/lib/xmet/spc.py +++ b/lib/xmet/spc.py @@ -689,6 +689,17 @@ class SPCOutlookMap(EquirectMap): kind: SPCOutlookType): if kind is SPCOutlookType.CATEGORICAL: colors = self.__category_colors__ + colors = dict() + + i = 0 + + for key in self.__category_colors__: + text = "%d/5 (%s)" % (i, key) + + colors[text] = self.__category_colors__[key] + + i += 1 + elif kind is SPCOutlookType.PROBABILISTIC: colors = dict()