|
|
@ -59,11 +59,12 @@ def main():
|
|
|
|
plt.close()
|
|
|
|
plt.close()
|
|
|
|
plt.clf()
|
|
|
|
plt.clf()
|
|
|
|
x = sorted(ts.data.keys()) # times
|
|
|
|
x = sorted(ts.data.keys()) # times
|
|
|
|
ys = [tuple(ts.data[time][0].get(state, 0) for state in ts.states) for time in x] # numbers per state
|
|
|
|
states = sorted(ts.states)
|
|
|
|
|
|
|
|
ys = [tuple(ts.data[time][0].get(state, 0) for state in states) for time in x] # numbers per state
|
|
|
|
# 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))
|
|
|
|
plt.stackplot(x, *ys)
|
|
|
|
plt.stackplot(x, ys, labels=states)
|
|
|
|
print('showing plot')
|
|
|
|
print('showing plot')
|
|
|
|
plt.show(block=False)
|
|
|
|
plt.show(block=False)
|
|
|
|
|
|
|
|
|
|
|
|