From 3d93bc371f3a625f905993dc8b449cdf232be047 Mon Sep 17 00:00:00 2001 From: Alberto Date: Tue, 9 May 2023 17:28:56 +0200 Subject: [PATCH] Changed plotting to match config changes --- analysis-module/src/plotting.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/analysis-module/src/plotting.py b/analysis-module/src/plotting.py index fc7e4f6..fb28cb2 100644 --- a/analysis-module/src/plotting.py +++ b/analysis-module/src/plotting.py @@ -40,7 +40,14 @@ def plot_figure_ex(metrics, simulation_config): # make lines invisible parts['cmeans'].set_visible(False) - num_subplots = len(metrics["to_query"]) + len(metrics.keys()) - 1 + # Loop through the subplots and plot your data + metrics = { + **metrics.pop("by_node"), + **metrics.pop("by_simulation"), + **metrics + } + + num_subplots = len(metrics.keys()) num_cols = 3 num_rows = math.ceil(num_subplots / num_cols) @@ -51,12 +58,6 @@ def plot_figure_ex(metrics, simulation_config): for i in range(num_subplots, num_rows * num_cols): fig.delaxes(axs[i]) - # Loop through the subplots and plot your data - metrics = { - **metrics.pop("to_query"), - **metrics - } - for i, metric in enumerate(metrics.values()): if type(metric["values"][0]) is list: if sum([len(sublist) for sublist in metric["values"]]) == 0: