%% Change Properties for Specific Bar Series
% Create a bar graph with a three-column matrix input and return the three bar    
% series objects. |bar| creates one bar series for each column in the matrix.

% Copyright 2015 The MathWorks, Inc.


y = [2 4 6; 3 4 5];
b = bar(y);
%% 
% Change properties for a specific bar series by indexing into the object
% array. For example, change properties of the bars representing the second
% column of y using |b(2)|. Starting in R2014b, you can use dot notation to
% set properties. If you are using an earlier release, use the
% <docid:matlab_ref.f67-432995> function instead.

b(2).LineWidth = 2;
b(2).EdgeColor = 'red';