www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/LabelzAxisandSetFontPropertiesExample.m

    %% Label z-Axis and Set Font Properties  
% Use |Name,Value| pairs to set the font size, font weight, and text color
% properties of the _z_-axis label.   

% Copyright 2015 The MathWorks, Inc.


%%  
figure
surf(peaks)
zlabel('Elevation','FontSize',12,...
       'FontWeight','bold','Color','r')

%%
% |'FontSize',12| displays the label text in 12-point font. |'FontWeight','bold'|
% makes the text bold. |'Color','r'| sets the text color to red.