www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/DisplayLabelsAsCurrencyValuesExample.m
%% 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 |'$%,.2f'|. 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 % |'\xA3%.2f'|. The option |\xA3| indicates the Unicode character % for the Pound symbol. ax.YAxis.TickLabelFormat = '\xA3%.2f';