Try setting the groups by using handle as described in the bar function
h=barerrorbar
>> set(h(1),'facecolor','white')
>> set(h(2),'facecolor','black')
For the final figure in the example code, I want to set the first group of bars (at x = 1) black and the second group (at x = 2) red.
Adapting the example code, I assumed I could do this:
figure
barerrorbar({1,xMeans(1,:),'k'}, {[1 1 1 1],xMeans(1,:), xMeansL(1,:),xMeansU(1,:),'bx'});
hold on
barerrorbar({2,xMeans(2,:),'r'}, {[2 2 2 2],xMeans(2,:), xMeansL(2,:),xMeansU(2,:),'bx'});
However, this gives an error. Could someone please advise on what the code should be?
Thanks.
Very useful, is there anyway to make the error bars one sided? By that I mean to only have the top half of the error bar showing as opposed to the entire thing?