Fix plotting: compatibility with 4th link port

This commit is contained in:
Koen van Greevenbroek 2024-01-24 15:48:33 +01:00
parent 2bee36be87
commit d8d3b2f2ab

View File

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