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

    %% Label y-Axis of Specific Axes  

% Copyright 2015 The MathWorks, Inc.


%% 
% Create two subplots and return the axes handles, |s(1)|
% and |s(2)|. 
figure
s(1) = subplot(2,1,1);
plot((1:10).^2)
s(2) = subplot(2,1,2);
plot((1:10).^3)  

%% 
% Label the _y_-axis of the top plot by referring to its axes handle, |s(1)|. 
ylabel(s(1),'Population')