Skip to content

Commit 0a5297a

Browse files
committed
Hotfix #2 specify is_long where needed
1 parent 21f2db3 commit 0a5297a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

switch_model/generators/core/dispatch.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def c(func):
581581
)
582582

583583

584-
@graph("dispatch", title="Average daily dispatch")
584+
@graph("dispatch", title="Average daily dispatch", is_long=True)
585585
def graph_hourly_dispatch(tools):
586586
"""
587587
Generates a matrix of hourly dispatch plots for each time region
@@ -598,7 +598,7 @@ def graph_hourly_dispatch(tools):
598598
)
599599

600600

601-
@graph("curtailment", title="Average daily curtailment")
601+
@graph("curtailment", title="Average daily curtailment", is_long=True)
602602
def graph_hourly_curtailment(tools):
603603
# Read dispatch.csv
604604
df = tools.get_dataframe("dispatch.csv")
@@ -615,6 +615,7 @@ def graph_hourly_curtailment(tools):
615615
"dispatch_per_scenario",
616616
title="Average daily dispatch",
617617
requires_multi_scenario=True,
618+
is_long=True,
618619
)
619620
def graph_hourly_dispatch(tools):
620621
"""
@@ -634,6 +635,7 @@ def graph_hourly_dispatch(tools):
634635
"curtailment_compare_scenarios",
635636
title="Average daily curtailment by scenario",
636637
requires_multi_scenario=True,
638+
is_long=True,
637639
)
638640
def graph_hourly_curtailment(tools):
639641
# Read dispatch.csv
@@ -646,7 +648,11 @@ def graph_hourly_curtailment(tools):
646648
)
647649

648650

649-
@graph("total_dispatch", title="Total dispatched electricity")
651+
@graph(
652+
"total_dispatch",
653+
title="Total dispatched electricity",
654+
is_long=True,
655+
)
650656
def graph_total_dispatch(tools):
651657
# ---------------------------------- #
652658
# total_dispatch.png #

switch_model/tools/graph/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ def save_figure(self, fig, filename=None):
628628

629629
def run_graph_func(self, func):
630630
"""Runs the graphing function"""
631-
print(f"{func.name}", end=", ")
631+
print(f"{func.name}", end=", ", flush=True)
632632
self._run_per_scenario = len(self._scenarios) > 1 and not func.multi_scenario
633633
self._figure_handler.set_properties(
634634
func.name,

0 commit comments

Comments
 (0)