generate_plots.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:krafters 作者: GianlucaBortoli 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号