%% Add Text to End of Each Label
% Create a bar chart. Display $^{\circ}\rm F$ after each tick value label
% along the _y_-axis by setting the |TickLabelFormat| property to the
% string |'%g^\\circF'|.

% Copyright 2015 The MathWorks, Inc.


temp = [37 39 46 56 67 77 82 80 73 62 52 42];
bar(temp)
ylabel('Average temperature')
xlim([0 13])

ax = gca;
ax.YAxis.TickLabelFormat = '%g^\\circF';