第1个回答 2013-07-07
>> help bar3
bar3 3-D bar graph.
bar3(Y,Z) draws the columns of the M-by-N matrix Z as vertical 3-D
bars. The vector Y must be monotonically increasing or
decreasing.
bar3(Z) uses the default value of Y=1:M. For vector inputs,
bar3(Y,Z) or bar3(Z) draws LENGTH(Z) bars. The colors are set by
the colormap.
bar3(Y,Z,WIDTH) or bar3(Z,WIDTH) specifies the width of the
bars. Values of WIDTH > 1, produce overlapped bars. The default
value is WIDTH=0.8
bar3(...,'detached') produces the default detached bar chart.
bar3(...,'grouped') produces a grouped bar chart.
bar3(...,'stacked') produces a stacked bar chart.
bar3(...,LINESPEC) uses the line color specified (one of 'rgbymckw').
bar3(AX,...) plots into AX instead of GCA.
H = bar3(...) returns a vector of handles to barseries objects.
Example:
subplot(1,2,1), bar3(peaks(5))
subplot(1,2,2), bar3(rand(5),'stacked')