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

    %% Change Base Value for Area Plot
% Create an area plot of matrix |Y|. By default, the base value is 0.
% Change the base value by specifying the optional basevalue argument.

% Copyright 2015 The MathWorks, Inc.



Y = [1, 5, 3;
     3, 2, 7;
     1, 5, 3;
     2, 6, 1];

figure
basevalue = 1;
area(Y,basevalue)