Labels with last counts

master
LEdoian 9 months ago
parent 8f8ecbd4d3
commit 3b4f07663b

@ -66,8 +66,10 @@ def main():
# We do not show jobstates atm. Too lazy. # We do not show jobstates atm. Too lazy.
# ys are transposed we need vectors by times, not by states. # ys are transposed we need vectors by times, not by states.
ys = list(zip(*ys)) 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.clf()
plt.stackplot(x, ys, labels=states) plt.stackplot(x, ys, labels=labels)
plt.legend(loc='upper left') plt.legend(loc='upper left')
print('showing plot') print('showing plot')

Loading…
Cancel
Save