Matplotlib Errorbar Caps Missing

What worked for me was adding this (as per: How to set the line width of error bar caps, in matplotlib):

(_, caps, _) = plt.errorbar(x,y, yerr=err, capsize=20, elinewidth=3)

for cap in caps:
    cap.set_color('red')
    cap.set_markeredgewidth(10)

Leave a Comment