diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-06-27 08:23:39 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-06-27 08:23:39 +0200 |
commit | 30758926e1c2e4324cd3601f77f59781968febb1 (patch) | |
tree | fd9d94da9630dc8dc878b9a77c1b3811937a995e /bin | |
parent | b6cbc26212354963b719f81ef425fe30768f2584 (diff) |
analyze-kconfig: only import plotter (→matplotlib) when needed
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-kconfig.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index da58bc7..0307dd8 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -19,7 +19,6 @@ import time import numpy as np import dfatool.cli -import dfatool.plotter import dfatool.utils import dfatool.functions as df from dfatool.loader.kconfig import KConfigAttributes @@ -365,6 +364,8 @@ def main(): dfatool.cli.export_json_unparam(model, args.export_json_unparam) if args.plot_unparam: + import dfatool.plotter + for kv in args.plot_unparam.split(";"): state_or_trans, attribute, ylabel = kv.split(":") fname = "param_y_{}_{}.pdf".format(state_or_trans, attribute) @@ -377,6 +378,8 @@ def main(): ) if args.boxplot_unparam: + import dfatool.plotter + title = None if args.filter_param: title = "filter: " + ", ".join( @@ -405,6 +408,8 @@ def main(): dfatool.cli.boxplot_param(args, model) if args.plot_param: + import dfatool.plotter + for kv in args.plot_param.split(";"): try: state_or_trans, attribute, param_name, *function = kv.split(":") |