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

    %% Label x-Axis of Specific Subplot
% Create a figure with two subplots. Label the _x_-axis of the top subplot.

% Copyright 2015 The MathWorks, Inc.


ax1 = subplot(2,1,1);
plot((1:10).^2)
xlabel(ax1,'Population')

ax2 = subplot(2,1,2);
plot((1:10).^3)