def generateMassPlot(test):
# set figure size
plt.figure(figsize=(15, 6))
handles = []
# draw plot
for raw in test:
label = raw.pop(0)
yAxis = [i / (len(raw)) for i in range(len(raw) + 1)]
values = sorted([float(i) for i in raw])
xAxis = [0] + values
handle, = plt.plot(xAxis, yAxis, label=label)
handles.append(handle)
# put axis labels
plt.xlabel("time (s)")
plt.ylabel("probability of completion")
plt.legend(handles=handles)
评论列表
文章目录