Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Update gridlabd-plot (#988)
Browse files Browse the repository at this point in the history
Co-authored-by: Alyona Teyber <Ivanova.alyona5@gmail.com>
  • Loading branch information
David P. Chassin and aivanova5 authored Aug 26, 2021
1 parent 1a0ea0a commit f933985
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gldcore/scripts/gridlabd-plot
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def main(args):
E_NODATA = 2
E_EXCEPTION = 3

def exception(msg,code=None):
def exception(msg=None,code=None):
"""Print exception message
Exception messages are printed only if the configuration parameter `exception` is false.
Expand Down Expand Up @@ -311,6 +311,15 @@ def main(args):
debug("figure_options = "+json.dumps(figure_options,indent=4),level=1)
try:
data = pandas.read_csv(config['input_pathname'])
if not plot_options["x"]:
plot_options["x"] = data.columns[0]
plot_options["rot"] = 90
plot_options["figsize"] = (10,7)
figure_options["tight_layout"] = True
figure_options["dpi"] = 200.0
if not plot_options["y"]:
plot_options["y"] = data.columns[1:].to_list()
plot_options["legend"] = True
plt = data.plot(**plot_options)
if plt:
for key, value in figure_options.items():
Expand Down

0 comments on commit f933985

Please sign in to comment.