function to plot election-like 3d bars.
high: absolute height of the bars (1 value)
val: a vector of N-values to plot
colo: a 2D-matrix of N x RGB-color triplets
randomVote: set  make your own election and compare with reality.
This might be usefull to simulated the sort of randomness one sometimes
feels after elections.
OUTPUT: handles of the patches: for N-columns this is a 4 x N matrix,
1st line: refering to the gray/empty urn(s)
2nd -||-: -||- colored column(s)
3rd -||-: -||- bottom of the colomn(s)
4th -||-: -||- top of the column(s)
% example 1: plot 10 columns as staircase , with random colors
%example 2; %participate in Germany's election, hit <space> to give your
col=[0 0 0;1 0 0; 1 1 0;0 .6 0; 1 0 1];
paul koch (2022). votebar (https://www.mathworks.com/matlabcentral/fileexchange/27545-votebar), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired: COLOUR DETECTOR
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!