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

    %% 3-D Bar Graph with Stacked Style
% Load the data set |count.dat|, which returns a three-column matrix, |count|.
% Store |Y| as the first 10 rows of |count|.

% Copyright 2015 The MathWorks, Inc.

load count.dat
Y = count(1:10,:);

%%
% Create a 3-D bar graph of |Y|. Stack the elements in each row of
% |Y| by specifying the style option as |stacked|.
figure
bar3(Y,'stacked')
title('Stacked Style')