Unlike many line plots, the color property cannot be used to set transparency in errorbar().
Transparency can be set from within the hidden Bar and Line objects that represent the errorbars and trend line, respectively.
cla
hold on
plot(rand(20),rand(20)*2-.5, 'yo', 'MarkerFaceColor', 'k', 'MarkerSize', 15, 'LineWidth', 1.5);
h = errorbar(linspace(0,1,5), linspace(0,1,5), .5*ones(1,5), 'r', 'LineWidth', 10);
alpha = 0.65;
set([h.Bar, h.Line], 'ColorType', 'truecoloralpha', 'ColorData', [h.Line.ColorData(1:3); 255*alpha])
Best Answer