x = [1 2 3]; str = {'sam'; 'alan'; 'ellie'}; bar(x) set(gca, 'XTickLabel',str, 'XTick',1:numel(str))
[/g0]