From 0895c6dfc01d969e7bbe09799282c338931b0e70 Mon Sep 17 00:00:00 2001 From: kkaris Date: Fri, 22 Mar 2024 09:10:03 -0700 Subject: [PATCH 1/2] Set global defaults for comparison graph colors --- mira/metamodel/comparison.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mira/metamodel/comparison.py b/mira/metamodel/comparison.py index d8b940940..bece58945 100644 --- a/mira/metamodel/comparison.py +++ b/mira/metamodel/comparison.py @@ -19,6 +19,11 @@ from .utils import safe_parse_expr +TAG1_COLOR = "orange" +TAG2_COLOR = "blue" +MERGE_COLOR = "red" + + class DataNode(BaseModel): """A node in a ModelComparisonGraphdata""" @@ -409,9 +414,9 @@ def __init__( refinement_function: Callable[[str, str], bool], tag1: str = "1", tag2: str = "2", - tag1_color: str = "orange", - tag2_color: str = "blue", - merge_color: str = "red", + tag1_color: str = TAG1_COLOR, + tag2_color: str = TAG2_COLOR, + merge_color: str = MERGE_COLOR, ): """Create a TemplateModelDelta @@ -681,9 +686,9 @@ def for_jupyter( name="model.png", tag1="1", tag2="2", - tag1_color="blue", - tag2_color="green", - merge_color="orange", + tag1_color=TAG1_COLOR, + tag2_color=TAG2_COLOR, + merge_color=MERGE_COLOR, prog: str = "dot", args: str = "", format: Optional[str] = None, From ab50ba461f84a7cd3b6f5ce04790af80cc706b84 Mon Sep 17 00:00:00 2001 From: kkaris Date: Fri, 22 Mar 2024 09:20:10 -0700 Subject: [PATCH 2/2] Update colors --- mira/metamodel/comparison.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mira/metamodel/comparison.py b/mira/metamodel/comparison.py index bece58945..a53c75931 100644 --- a/mira/metamodel/comparison.py +++ b/mira/metamodel/comparison.py @@ -19,9 +19,9 @@ from .utils import safe_parse_expr -TAG1_COLOR = "orange" -TAG2_COLOR = "blue" -MERGE_COLOR = "red" +TAG1_COLOR = "blue" +TAG2_COLOR = "green" +MERGE_COLOR = "orange" class DataNode(BaseModel): @@ -433,11 +433,11 @@ def __init__( tag2 : The tag for the second template model. Default: "2" tag1_color : - The color for the first template model. Default: "orange" + The color for the first template model. Default: "blue" tag2_color : - The color for the second template model. Default: "blue" + The color for the second template model. Default: "green" merge_color : - The color for the merged template model. Default: "red" + The color for the merged template model. Default: "orange" """ self.refinement_func = refinement_function self.template_model1 = template_model1