From c754f253bc21afb264aa9697d19ec42d4203944d Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Sun, 20 Feb 2022 16:13:11 +0100 Subject: [PATCH] plotting adjustments for pypsa 0.19.1 --- config.default.yaml | 2 +- scripts/plot_network.py | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/config.default.yaml b/config.default.yaml index 5340682b..cb0b70ff 100644 --- a/config.default.yaml +++ b/config.default.yaml @@ -387,7 +387,7 @@ plotting: boundaries: [-11, 30, 34, 71] color_geomap: ocean: white - land: whitesmoke + land: white costs_max: 1000 costs_threshold: 1 energy_max: 20000 diff --git a/scripts/plot_network.py b/scripts/plot_network.py index e2409a99..0f4abcee 100644 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -263,7 +263,7 @@ def plot_map(network, components=["links", "stores", "storage_units", "generator ) legend_kw = dict( - bbox_to_anchor=(1.55, 1.04), + bbox_to_anchor=(1.52, 1.04), frameon=False, ) @@ -361,13 +361,18 @@ def plot_h2_map(network): subplot_kw={"projection": ccrs.EqualEarth()} ) - color_h2_pipe = '#a2f0f2' - color_retrofit = '#72d3d6' + color_h2_pipe = '#b3f3f4' + color_retrofit = '#54cacd' + bus_colors = { + "H2 Electrolysis": "#ff29d9", + "H2 Fuel Cell": "#6b3161", + } + n.plot( geomap=True, bus_sizes=bus_sizes, - bus_colors=tech_colors, + bus_colors=bus_colors, link_colors=color_h2_pipe, link_widths=link_widths_total, branch_components=["Link"], @@ -376,13 +381,13 @@ def plot_h2_map(network): ) n.plot( - geomap=True, # set False in PyPSA 0.19 + geomap=True, bus_sizes=0, link_colors=color_retrofit, link_widths=link_widths_retro, branch_components=["Link"], ax=ax, - # color_geomap=False, # needs PyPSA 0.19 + color_geomap=False, boundaries=map_opts["boundaries"] ) @@ -424,7 +429,7 @@ def plot_h2_map(network): legend_kw=legend_kw, ) - colors = [tech_colors[c] for c in carriers] + [color_h2_pipe, color_retrofit] + colors = [bus_colors[c] for c in carriers] + [color_h2_pipe, color_retrofit] labels = carriers + ["H2 pipeline (total)", "H2 pipeline (repurposed)"] legend_kw = dict( @@ -533,24 +538,24 @@ def plot_ch4_map(network): ) n.plot( - geomap=True, # set False in PyPSA 0.19 + geomap=True, ax=ax, bus_sizes=0., link_colors=pipe_colors['gas pipeline (available)'], link_widths=link_widths_rem, branch_components=["Link"], - # color_geomap=False, # needs PyPSA 0.19 + color_geomap=False, boundaries=map_opts["boundaries"] ) n.plot( - geomap=True, # set False in PyPSA 0.19 + geomap=True, ax=ax, bus_sizes=0., link_colors=link_color_used, link_widths=link_widths_used, branch_components=["Link"], - # color_geomap=False, # needs PyPSA 0.19 + color_geomap=False, boundaries=map_opts["boundaries"] )