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

    %% Add Horizontal Colorbar to Graph
% Add a horizontal colorbar below a plot by specifying the colorbar location as
% |'southoutside'|.

% Copyright 2015 The MathWorks, Inc.


%%
figure
contourf(peaks)
colorbar('southoutside')