diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-06-27 08:47:04 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-06-27 08:47:04 +0200 |
commit | 54886307daed58eee704c88f972cb3b578366b95 (patch) | |
tree | dfd9f1c071c08e12ab8217625395b51551074508 /bin | |
parent | 702dd499ea48e78db053121261cd9cd3c345354c (diff) |
fix UnboundLocalError. Yay for Python variable scoping.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-kconfig.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index 0307dd8..ec08a3b 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -364,12 +364,12 @@ def main(): dfatool.cli.export_json_unparam(model, args.export_json_unparam) if args.plot_unparam: - import dfatool.plotter + import dfatool.plotter as dp for kv in args.plot_unparam.split(";"): state_or_trans, attribute, ylabel = kv.split(":") fname = "param_y_{}_{}.pdf".format(state_or_trans, attribute) - dfatool.plotter.plot_y( + dp.plot_y( model.by_name[state_or_trans][attribute], xlabel="measurement #", ylabel=ylabel, @@ -378,7 +378,7 @@ def main(): ) if args.boxplot_unparam: - import dfatool.plotter + import dfatool.plotter as dp title = None if args.filter_param: @@ -387,7 +387,7 @@ def main(): ) for name in model.names: attr_names = sorted(model.attributes(name)) - dfatool.plotter.boxplot( + dp.boxplot( attr_names, [model.by_name[name][attr] for attr in attr_names], xlabel="Attribute", @@ -396,7 +396,7 @@ def main(): show=not args.non_interactive, ) for attribute in attr_names: - dfatool.plotter.boxplot( + dp.boxplot( [attribute], [model.by_name[name][attribute]], output=f"{args.boxplot_unparam}{name}-{attribute}.pdf", @@ -408,7 +408,7 @@ def main(): dfatool.cli.boxplot_param(args, model) if args.plot_param: - import dfatool.plotter + import dfatool.plotter as dp for kv in args.plot_param.split(";"): try: @@ -423,7 +423,7 @@ def main(): function = gplearn_to_function(" ".join(function)) else: function = None - dfatool.plotter.plot_param( + dp.plot_param( model, state_or_trans, attribute, |