votebar

버전 1.0.0.0 (2.89 KB) 작성자: paul koch
function to plot 'election-like' 3d bars
다운로드 수: 733
업데이트 날짜: 2010/5/9

라이선스 보기

편집자 메모: This file was selected as MATLAB Central Pick of the Week

function to plot election-like 3d bars.
hp=votebar(high,val,colo,randomVote)

INPUT:
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 [1] 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
hp=votebar(7,1:7,[],0)

%example 2; %participate in Germany's election, hit <space> to give your
% vote
val=rand(1,5)*100
col=[0 0 0;1 0 0; 1 1 0;0 .6 0; 1 0 1];
votebar(100,val,col,1);

인용 양식

paul koch (2024). votebar (https://www.mathworks.com/matlabcentral/fileexchange/27545-votebar), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Stair Plots에 대해 자세히 알아보기
도움

줌: COLOUR DETECTOR

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0