Bar3D
版本 1.2 (650.5 KB) 作者:
Ze-Zheng Wu
A function to create 3d bar plot with the ability to set X and Y values.
BAR3D 3-D bar plot.
BAR3D(X,Y,Z) plots the 3d bars defined by X, Y and Z, where X and Y are m by n matrices which can be generated by meshgrid from vectors, and Z is an m by n by p matrix. If p is greater than 1, p sets of m by n bars are drawn in the same axes, the default arrangement of bars in the same position but from different sets is being grouped along the x axis, and this default behavior can be modified by setting the parameter 'Arrange'.
BAR3D(X,Y,Z,C) additionally specifies the color of bars, where C is of the same size as X or Y.
BAR3D(Z) is similar to BAR3D(X,Y,Z) but uses the column and row indices of the elements in Z as x and y coordinates.
BAR3D(Z,C) additionally specifies the color of bars.
BAR3D(...,'Width',width) sets the value of the width of bars.
BAR3D(...,'Base',base) sets the base value of the plot, where base can be a scalar value or an m by n matrix.
BAR3D(...,'Arrange',arrange) sets the arrangement of bars if Z is a multidimensional matrix. Available options are 'hold', where bars are plot in the same position, 'x', where bars are grouped along x axis, 'y', where bars are grouped along y axis and 'z' where bars are grouped along z axis or, in other words, stacked together.
BAR3D(...,'Gap',gap) sets the gap of bars if the arrangement is 'x' or 'y', where the gap is considered as a ratio, or 'z', where the gap is considered as a numeric value.
BAR3D(...,'PropertyName',PropertyValue,...) sets the value of the specified BAR3D property, apart from 'Width', 'Base', 'Arrange' and 'Gap'. The property names and values are the same as those of SURF.
BAR3D(AX,...) plots into AX instead of GCA.
h = BAR3D returns a handle to a surface plot object or multiple handles to all the surface plot objects.
AXIS, CAXIS, COLORMAP, HOLD, SHADING and VIEW set figure, axes, and surface properties which affect the display of the 3d bars.
Ze-Zheng Wu 10-1-21
引用格式
Ze-Zheng Wu (2024). Bar3D (https://www.mathworks.com/matlabcentral/fileexchange/100119-bar3d), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2021a
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.2 | 1. reformat description. |
|
|
1.1 | 1. remove matlab.ui.internal.webGraphicsStateManager;
|
|
|
1.0 |
|