Changed plotting to match config changes

This commit is contained in:
Alberto 2023-05-09 17:28:56 +02:00
parent 7ee98fbf15
commit 3d93bc371f
1 changed files with 8 additions and 7 deletions

View File

@ -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: