From d8d3b2f2ab161056c2166b4a869cc792b98fac58 Mon Sep 17 00:00:00 2001 From: Koen van Greevenbroek Date: Wed, 24 Jan 2024 15:48:33 +0100 Subject: [PATCH] Fix plotting: compatibility with 4th link port --- scripts/plot_summary.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/plot_summary.py b/scripts/plot_summary.py index b2ec0892..92bf726c 100644 --- a/scripts/plot_summary.py +++ b/scripts/plot_summary.py @@ -282,7 +282,10 @@ def plot_balances(): # remove trailing link ports df.index = [ i[:-1] - if ((i not in ["co2", "NH3", "H2"]) and (i[-1:] in ["0", "1", "2", "3"])) + if ( + (i not in ["co2", "NH3", "H2"]) + and (i[-1:] in ["0", "1", "2", "3", "4"]) + ) else i for i in df.index ]