From f4aed10e48c2f5e76b9a016f1c862b74e447ecb3 Mon Sep 17 00:00:00 2001 From: Weiguo Jing <31991208+jingslaw@users.noreply.github.com> Date: Tue, 26 Nov 2024 17:09:03 +0100 Subject: [PATCH] revised number of rows in eos precision plot (#242) * revised number of rows in eos precision plot * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/aiida_sssp_workflow/cli/inspect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aiida_sssp_workflow/cli/inspect.py b/src/aiida_sssp_workflow/cli/inspect.py index a85b42c5..b94a9b40 100644 --- a/src/aiida_sssp_workflow/cli/inspect.py +++ b/src/aiida_sssp_workflow/cli/inspect.py @@ -5,6 +5,7 @@ import json import random from pathlib import Path +from math import ceil import click import matplotlib.pyplot as plt @@ -333,7 +334,7 @@ def inspect(node, output): pass # if there are 5 plots, need 3 rows, since the output_parametres is in the dict len(precision) / 2 is the number of rows - rows = len(precision) // 2 + rows = ceil(len(results) / 2) # create a figure with 2 columns and rows rows on a a4 size paper fig, axs = plt.subplots(rows, 2, figsize=(8.27, 11.69), dpi=100)