Skip to content

Commit b25d24f

Browse files
committed
th by 0.5. Fixe legend
1 parent 350fd9d commit b25d24f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

terminal-plotter.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ def main():
161161
compute_ad = not compute_ad
162162
update_plot = True
163163
elif key == 't':
164-
anomaly_threshold += 1; update_plot = True
164+
anomaly_threshold += 0.5; update_plot = True
165165
elif key == 'g':
166-
anomaly_threshold = max(1, anomaly_threshold - 1); update_plot = True
166+
anomaly_threshold = max(1, anomaly_threshold - 0.5); update_plot = True
167167
elif key == 'e':
168168
anomaly_window_size += 1; update_plot = True
169169
elif key == 'E':
@@ -181,9 +181,9 @@ def main():
181181
elif key == 'X':
182182
ra_ad_window_size += 10; update_plot = True
183183
elif key == 'c':
184-
ra_ad_threshold = max(1, ra_ad_threshold - 1); update_plot = True
184+
ra_ad_threshold = max(1, ra_ad_threshold - 0.5); update_plot = True
185185
elif key == 'v':
186-
ra_ad_threshold += 1; update_plot = True
186+
ra_ad_threshold += 0.5; update_plot = True
187187
elif key == 's':
188188
# Save to YAML
189189
cfg = {
@@ -298,10 +298,13 @@ def main():
298298
f"AvgW:{avg_window}(rR/fF)",
299299
f"AvgADTH:{ra_ad_threshold} (cC/vV)",
300300
f"AvgADW:{ra_ad_window_size} (zZ/xX)",
301-
f"AD:{'ADON' if compute_ad else 'ADOF'} (a)",
301+
f"AD:{'On' if compute_ad else 'Off'} (a)",
302302
f"Style:{plot_style}(.)",
303303
f"SaveConf (s)",
304-
f"Show Lines (1,2,3,4)",
304+
f"DataL: {'On' if show_raw else 'Off'} (1)",
305+
f"AvgL: {'On' if show_avg else 'Off'} (2)",
306+
f"DADL: {'On' if show_anomalies else 'Off'} (3)",
307+
f"AvgADL: {'On' if show_ra_anomalies else 'Off'} (4)",
305308
]
306309

307310
if hasattr(plt, "legend"):

0 commit comments

Comments
 (0)