From f68642e3a671a0e85e4848fe31005536e586697c Mon Sep 17 00:00:00 2001 From: IMDijkstra <73649939+iddie1994@users.noreply.github.com> Date: Wed, 16 Feb 2022 10:24:15 +0100 Subject: [PATCH] Add files via upload --- finish-pairsscatter_gas_vensim_NO_policy.py | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 finish-pairsscatter_gas_vensim_NO_policy.py diff --git a/finish-pairsscatter_gas_vensim_NO_policy.py b/finish-pairsscatter_gas_vensim_NO_policy.py new file mode 100644 index 0000000..b2ffe39 --- /dev/null +++ b/finish-pairsscatter_gas_vensim_NO_policy.py @@ -0,0 +1,40 @@ +import matplotlib.pyplot as plt + +from ema_workbench import ema_logging, load_results +from ema_workbench.analysis import Density +from ema_workbench.analysis.pairs_plotting import (pairs_scatter) + +from ema_workbench.analysis.pairs_plotting import (pairs_lines, pairs_scatter, + pairs_density) + +ema_logging.log_to_stderr(ema_logging.INFO) + +file_name = r'./data/windhydrogen.tar.gz' +experiments, outcomes = load_results(file_name) + +# the plotting functions return the figure and a dict of axes +fig, axes = pairs_lines(experiments, + outcomes, density=Density.VIOLIN) +fig.set_figheight(6) +fig.set_figwidth(12) + +plt.show() + +# import seaborn as sns +# +# ema_logging.log_to_stderr(ema_logging.INFO) +# +# file_name = r'./data/100 gas cases no policy.tar.gz' +# experiments, outcomes = load_results(file_name) +# +# df = pd.DataFrame.from_dict(outcomes) +# df = df.assign(policy=experiments['policy']) +# +# # rename the policies using numbers +# df['policy'] = df['policy'].map({p: i for i, p in +# enumerate(set(experiments['policy']))}) +# +# # use seaborn to plot the dataframe +# grid = sns.pairplot(df, hue='policy', vars=outcomes.keys()) +# ax = plt.gca() +# plt.show() \ No newline at end of file