plot_functions.py 文件源码

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

项目:idea_relations 作者: Noahs-ARK 项目源码 文件源码
def ax_plot_lines(ax, xs, ys, colors, shapes, linestyles,
                  errorbar=False, linewidth=LINEWIDTH):
    lines = []
    for (x, y, c, s, l) in zip(xs, ys, colors, shapes, linestyles):
        if errorbar:
            # y should be a list of lists in this case
            mean = [np.mean(yl) for yl in y]
            error = [ss.sem(yl) for yl in y]
            l = ax.errorbar(x, mean, yerr=error, color=c,
                marker=s, linestyle=l, ecolor=c)
        else:
            l, = ax.plot(x, y, color=c, marker=s, linestyle=l, linewidth=linewidth)
        lines.append(l)
    return lines
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号