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

    %% Specify Bar Width for 3-D Horizontal Bar Graph
% Load the data set |count.dat|, which returns a three-column matrix, |count|.
% Store |Y| as the first ten rows of |count|.

% Copyright 2015 The MathWorks, Inc.


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

%%
% Create a 3-D horizontal bar graph of |Y| and set the bar width to 0.5.
width = 0.5;

figure
bar3h(Y,width)
title('Width of 0.5')