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
评论列表
文章目录