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

    %% Label z-Axis of Specific Axes  

% Copyright 2015 The MathWorks, Inc.


%% 
% Create two subplots and return the handles to the axes objects, |s(1)|
% and |s(2)|. 
figure
s(1) = subplot(2,1,1);
surf(peaks(30))
s(2) = subplot(2,1,2);
surf(peaks(45))  

%% 
% Label the _z_-axis of each plot by referring to the axes handles, |s(1)|
% and |s(2)|. 
zlabel(s(1),'Height1')
zlabel(s(2),'Height2')