From e45c7a65ffb767a5831ac6623813d2dd11228afb Mon Sep 17 00:00:00 2001 From: Seth <78690362+thesethtruth@users.noreply.github.com> Date: Mon, 28 Mar 2022 12:10:51 +0200 Subject: [PATCH] Apply suggestions from Martha's code review Co-authored-by: Martha Frysztacki --- scripts/plot_network.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/plot_network.py b/scripts/plot_network.py index 24d49473..3f95e16d 100755 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -181,7 +181,7 @@ def plot_map(n, ax=None, attribute='p_nom', opts={}): return fig -def plot_total_energy_pie(n, ax=None, opts={}): +def plot_total_energy_pie(n, opts, ax=None): if ax is None: ax = plt.gca() ax.set_title('Energy per technology', fontdict=dict(fontsize="medium")) @@ -199,7 +199,7 @@ def plot_total_energy_pie(n, ax=None, opts={}): t1.remove() t2.remove() -def plot_total_cost_bar(n, ax=None, opts={}): +def plot_total_cost_bar(n, opts, ax=None): if ax is None: ax = plt.gca() total_load = (n.snapshot_weightings.generators * n.loads_t.p.sum(axis=1)).sum() @@ -258,13 +258,7 @@ if __name__ == "__main__": set_plot_style() - paths, config, wildcards, logs, out = ( - snakemake.input, - snakemake.config, - snakemake.wildcards, - snakemake.log, - snakemake.output, - ) + config, wildcards = snakemake.config, snakemake.wildcards map_figsize = config["plotting"]['map']['figsize'] map_boundaries = config["plotting"]['map']['boundaries']