Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / examples / cpp / battery-degradation / plot_battery_degradation.py
1 # Copyright (c) 2003-2023. The SimGrid Team.
2 # All rights reserved.
3
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the license (GNU LGPL) which comes with this package.
6  
7 import sys
8 import pandas as pd
9 import seaborn as sns 
10
11 df = pd.read_csv(sys.argv[1], names=['Time','Value', 'SoC - SoH'])
12 df['Time'] = df['Time'].apply(lambda x: float(x.split(" ")[-1]))
13 sns.set_theme()
14 sns.set(rc={'figure.figsize':(16,8)})
15 g = sns.lineplot(data=df, x='Time', y='Value', hue='SoC - SoH')
16 g.get_figure().savefig('battery_degradation.svg')