%% Display Labels as Currency Values
% Create a stem chart. Display the tick label values along the _y_-axis as
% U.S. dollar values with two decimal places by setting the
% |TickLabelFormat| property to the string |'$%,.2f'|.

% Copyright 2015 The MathWorks, Inc.


profit = [20 40 50 40 50 60 70 60 70 60 60 70 80 90];
stem(profit)
xlim([0 15])

ax = gca;
ax.YAxis.TickLabelFormat = '$%,.2f';

%%
% Display the values as British Pounds by setting the property to the
% string |'\xA3%.2f'|. The option |\xA3| indicates the Unicode character
% for the Pound symbol.

ax.YAxis.TickLabelFormat = '\xA3%.2f';