BARPATCH | Highly customizable bar graph w/error bars

버전 1.3.0.0 (7.72 KB) 작성자: Bob Spunt
Create and customize a bar graph with error bars. Supports grouped data.
다운로드 수: 527
업데이트 날짜: 2016/10/31

This function will create a grouped bar graph with error bars without using the standard plotting functions BAR and ERRORBAR. It uses PATCH to create the bars and LINE to construct the error bars.
USAGE: h = barpatch(data, varargin)

__________________________________________________________________________
OUTPUT

h: handles to all graphics objects

__________________________________________________________________________
INPUTS

data: data matrix to plot; rows are cases, columns are variables
varargin: optional arguments entered as "name,value" pairs (to see default values, run barpatch without arguments). partial matches OK:

figh - handle for figure to plot in
groupidx - rows index columns of "data" to plot as a group
groupname - labels for different groups of bars
grouptick - flag to place tickmark between groups on x-axis
barname - labels for different bars within groups (in legend)
barcmap - colormap for distinguishing bars within a group
barwidth - width of bars (>1 produces overlapping bars)
errlinewidth- width of error bar lines
t - figure title
xl - x-axis label
yl - y-axis label
fontsize - base font size
fontname - name of font to use
ytickformat - display formatting for yticklabels (e.g., '%.2f')
yticklength - # of yticks (if empty, determined automatically)

__________________________________________________________________________
USAGE EXAMPLE

data = randn(10, 8);
groupidx = [1 2; 3 4; 5 6; 7 8];
groupn = {'Group A' 'Group B' 'Group C' 'Group D'};
xl = 'X-Axis Label';
yl = 'Y-Axis Label';
t = 'The Figure Title';
h = barpatch(data, 'groupidx', groupidx, 'groupname', groupn, 'xl', xl, 'yl', yl, 't', t);

인용 양식

Bob Spunt (2024). BARPATCH | Highly customizable bar graph w/error bars (https://github.com/spunt/barpatch), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2015b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.3.0.0

Added optional arguments for specifying width of bars and the lines comprising error bars; updated doc and input checking
Updated documentation.

1.2.0.0

Improved input checking; added optional argument for custom colormap

1.1.0.0

Moved to GitHub. Fixes to label positioning.

1.0.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.