The thickness of a bar inside a legend can be changed by modifying the patch object itself. This can be accomplished as follows:
1. Create a BAR plot with a legend:
a=rand(1,100);
bar(a);
l=legend('foo');
2. Obtain and modify the 'xData' and 'yData' property of the legend patch object:
h=findobj(l,'type','patch');
set(h,'ydata',[0.,0.5,0.5,0.3,0.3],'xdata',[0.2,0.2,0.4,0.4,0.2]);