Top and bottom line on errorbar with python and seaborn
The capsize
parameter should be enough, but for some reason You have to specify the cap.set_markeredgewidth
for them to show up too.. Based on: Matplotlib Errorbar Caps Missing.
(_, caps, _) = plt.errorbar(
x_values, y_values, yerr=y_error, fmt='o', markersize=8, capsize=20)
for cap in caps:
cap.set_markeredgewidth(1)
returns:
The top and bottom lines on an errorbar are called caps.
To visualize them, just set capsize
to a value bigger 0, which is the default value:
plt.errorbar(x, y, yerr=stds, capsize=3)