From 6e47152a477cd92766f7f91e02fa03bd6ada8f5d Mon Sep 17 00:00:00 2001 From: Derek Feichtinger Date: Fri, 7 Aug 2026 09:59:31 +0200 Subject: [PATCH] add unit to x axis label in histo plots --- slurm-eff-tool.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/slurm-eff-tool.py b/slurm-eff-tool.py index ffaf779..c9e012d 100755 --- a/slurm-eff-tool.py +++ b/slurm-eff-tool.py @@ -1671,6 +1671,16 @@ def histo_graphs(out_rows: list[OutputRow], args: argparse.Namespace): term = args.hterm plotstyle = "set style fill transparent solid 0.35 noborder" linestyle = "with steps lw 2" + xax_unitstr = { + "elig_qtime": " (h)", + "mem_eff": "", + "planned_time": " (h)", + "usedmem": " (GB)", + "vpu_eff": "", + "start": "", + "time_eff": "", + "walltime": " (h)" + } if term in ("svg", "png"): width, height = 900, 600 @@ -1745,7 +1755,7 @@ def histo_graphs(out_rows: list[OutputRow], args: argparse.Namespace): gnuplot_cmd = (f'set title "{metric} distribution" noenhanced\n' f'{xax_format}' - f'set xlabel "{metric}" noenhanced\n' + f'set xlabel "{metric}{xax_unitstr[metric]}" noenhanced\n' f'set ylabel "jobs"\n' f'{plotstyle}\n' f'{termsetup[term]}\n'