version (1.86 KB) by Grzegorz Knor
Function similar to the matlab stem3 but drawing bars instead of lines with markers.


Updated 9 Oct 2010

View License

h = StemBar(x,y,z,color,width)
Function is similar to stem3, but instead of lines with markers plotting
3d bars

StemBar(x,y,z) - draws bars with a height z at the values specified in x
and y. x, y, z - should be a vectors.
StemBar(z) - draws bars with a height z at the xy-plane
StemBar(...,color) - If color is a single character string chosen from the
list 'r','g','b', 'c','m','y','w','k', or an RGB row vector triple,
[r g b], the bars are filled with the constant specified color. If color
is a vector of length numel(x)*6 each faces will be filled with specified
color in the corresponding row.
StemBar(...,width) - specified a width of bars
h = StemBar(...) - return a handle


h = StemBar(1:10);

Author: Grzegorz Knor

Cite As

Grzegorz Knor (2022). StemBar (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!