From: chris on
very useful. thanks

bh = bar(sharpe);
xl=get(gca,'xticklabel');
ch=get(bh,'children');
if iscell(ch)
ch=repmat([ch{:}],1,size(sharpe,1));
myle=repmat(str2,1,ceil(numel(sharpe)/numel(str2)));
myle=myle(1:numel(pnl.sharpe));
else
ch=repmat(ch,1,numel(sharpe));
xl=str2;
end
legend(ch,myle);
colormap jet;