Skip to content

Commit 0e28784

Browse files
committed
Make figures 3 and 4 match paper guidelines
1 parent e25b316 commit 0e28784

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
from papers.Martin_Staadecker_Value_of_LDES_and_Factors.LDES_paper_graphs.util import (
77
set_style,
8-
get_scenario,
8+
get_scenario, save_figure,
99
)
1010

11-
tools_solar = GraphTools([get_scenario("WS10", "91% Solar to 9% Wind")])
11+
tools_solar = GraphTools([get_scenario("WS10", "91% Solar to 9% Wind")], set_style=False)
1212
tools_solar.pre_graphing(multi_scenario=False)
1313

14-
tools_wind = GraphTools([get_scenario("WS066", "40% Solar to 60% Wind")])
14+
tools_wind = GraphTools([get_scenario("WS066", "40% Solar to 60% Wind")], set_style=False)
1515
tools_wind.pre_graphing(multi_scenario=False)
1616

1717
ROLLING_AVERAGE_DAYS = 7
@@ -20,7 +20,6 @@
2020
set_style()
2121
plt.close()
2222
fig = plt.figure()
23-
fig.set_size_inches(12, 8)
2423
ax1 = fig.add_subplot(1, 2, 1, projection=tools_solar.maps.get_projection())
2524
ax2 = fig.add_subplot(1, 2, 2, projection=tools_wind.maps.get_projection())
2625

@@ -108,3 +107,6 @@ def plot(tools, ax, data, legend=True):
108107
plot(tools_solar, ax1, get_data(tools_solar), legend=False)
109108
plt.tight_layout()
110109
plt.tight_layout() # Twice to ensure it works properly, it's a bit weird at times'
110+
111+
# %%
112+
save_figure("figure-3-wind-vs-solar.png")
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from switch_model.tools.graph.main import GraphTools
1010
from papers.Martin_Staadecker_Value_of_LDES_and_Factors.LDES_paper_graphs.util import (
1111
get_scenario,
12-
set_style,
12+
set_style, save_figure,
1313
)
1414

1515
scenarios = [
@@ -20,7 +20,7 @@
2020
get_scenario("1342", "Baseline"),
2121
get_scenario("T5", "10x Tx Build Costs"),
2222
]
23-
tools = GraphTools(scenarios=scenarios)
23+
tools = GraphTools(scenarios=scenarios, set_style=False)
2424
tools.pre_graphing(multi_scenario=True)
2525

2626
tools_supplementary = GraphTools(scenarios=scenarios_supplementary)
@@ -99,7 +99,6 @@ def get_data(scenario_index):
9999
set_style()
100100
plt.close()
101101
fig = plt.figure()
102-
fig.set_size_inches(12, 6)
103102

104103
# Define axes
105104
axes = []
@@ -121,7 +120,7 @@ def percent_to_color(percent):
121120
def plot(ax, data, legend):
122121
percent_gen, duration = data
123122

124-
max_size = 800
123+
max_size = 400
125124
max = 50
126125
duration["size"] = duration["OnlinePowerCapacityMW"] / max * max_size
127126
tools.maps.draw_base_map(ax)
@@ -137,8 +136,8 @@ def plot(ax, data, legend):
137136
handles=legend_handles,
138137
bbox_to_anchor=(0.6, 0),
139138
loc="lower center",
140-
fontsize=8,
141-
title_fontsize=10,
139+
fontsize="small",
140+
title_fontsize="small",
142141
ncol=4,
143142
)
144143
# Add legend for power capacity
@@ -161,8 +160,8 @@ def plot(ax, data, legend):
161160
],
162161
bbox_to_anchor=(0.35, 0),
163162
loc="lower center",
164-
fontsize=8,
165-
title_fontsize=10,
163+
fontsize="small",
164+
title_fontsize="small",
166165
ncol=3,
167166
labelspacing=1.5,
168167
)
@@ -194,14 +193,17 @@ def highlight_zones(zones, ax):
194193
crs=tools.maps.get_projection(),
195194
facecolor=(0, 0, 0, 0), # Transparent
196195
edgecolor="tab:green",
197-
linewidth=2,
196+
linewidth=1,
198197
# linestyle="--",
199198
# alpha=0,
200199
)
201200

202201

203202
highlight_zones(zones_to_highlight, axes[0])
204203

204+
# %% SAVE FIGURE
205+
save_figure("figure-4-baseline-vs-unlimited-tx.png")
206+
205207
# %%
206208
df = tools_supplementary.get_dataframe("storage_capacity.csv")
207209
df = df.set_index("load_zone")

0 commit comments

Comments
 (0)