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

    %% Label z-Axis and Return Object Handle  
% Label the _z_-axis and return the text object used as the
% label.   

% Copyright 2015 The MathWorks, Inc.


%%  
surf(peaks)
t = zlabel('Population Change'); 

%% 
% Set the color of the label to red. 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.
t.Color = 'red';