From 30d201d9d5d871d5691cb07e11ff6aaf07ae9159 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 18 Mar 2024 15:17:17 -0500 Subject: [PATCH] fix(colorobj): Ensure that LegendParameters.segment_count is respected --- honeybee/colorobj.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/honeybee/colorobj.py b/honeybee/colorobj.py index c008a2e9..7d8b1bbc 100644 --- a/honeybee/colorobj.py +++ b/honeybee/colorobj.py @@ -131,7 +131,8 @@ def graphic_container(self): # produce legend parameters with an ordinal dict for the attributes l_par = self.legend_parameters.duplicate() - l_par.segment_count = len(self._attributes_unique) + if l_par.is_segment_count_default: + l_par.segment_count = len(self._attributes_unique) l_par.ordinal_dictionary = attr_dict if l_par.is_title_default: l_par.title = self.attr_name_end.replace('_', ' ').title()