From 3b4f07663b32f48b874aa0160fab023d04f031f7 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Thu, 8 Feb 2024 09:32:49 +0100 Subject: [PATCH] Labels with last counts --- fosdem_video_progress.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fosdem_video_progress.py b/fosdem_video_progress.py index 1ab5ef2..dd54002 100755 --- a/fosdem_video_progress.py +++ b/fosdem_video_progress.py @@ -66,8 +66,10 @@ def main(): # We do not show jobstates atm. Too lazy. # ys are transposed – we need vectors by times, not by states. ys = list(zip(*ys)) + last = ts.data[max(ts.data.keys())][0] + labels = [f'{state}: {last.get(state, 0)}' for state in states] plt.clf() - plt.stackplot(x, ys, labels=states) + plt.stackplot(x, ys, labels=labels) plt.legend(loc='upper left') print('showing plot')