%% Create Bar Graph with Categorical Data
% Create a bar graph with categorical values along the x-axis. By default, the categories display in alphabetical order.

c = categorical({'apples','pears','oranges'});
prices = [1.23 0.99 2.3];
bar(c,prices)

% Copyright 2012 The MathWorks, Inc.