group_boxchart¶
- group_boxchart(data, groupid, feature_labels, group_labels, group_gap, feature_gap, markers, marker_colors, pvals, varargin)¶
GROUP_BOXCHART Draw a grouped boxchart with per-pair significance stars
- Usage:
- [h_box, pvals] = group_boxchart(data, groupid, feature_labels, …
group_labels, group_gap, feature_gap, markers, marker_colors, pvals, …)
- Inputs:
data : NxF double - F features over N observations – required groupid : Nx1 double - group id per observation – required feature_labels : 1xF cell of char - feature labels
(default: {‘Feature 1’, …, ‘Feature F’})
- group_labels1xG cell of char - group labels
(default: {‘Group 1’, …, ‘Group G’})
group_gap : double - spacing within a group (default: 0.5) feature_gap : double - spacing between features (default: 1) markers : 1xG char - marker glyphs per group (default: ‘o^sdvph>o^sdvph>o^sdvph>’) marker_colors : char or Nx3 double - colors
(default: repmat(get(gca,’colororder’),5,1))
- pvalsFxK double - precomputed p-values;
if empty, pairwise ttest2 is used (default: [])
- Name-Value Pairs:
Any name-value pair accepted by boxchart is forwarded.
- Outputs:
h_box : 1xF array of boxchart handles pvals : FxK double of pairwise p-values
Example
data = [randn(10,3); randn(12,3)+1; randn(15,3)-1]; groupid = [zeros(10,1); ones(12,1); 2*ones(15,1)]; group_boxchart(data, groupid);
See also: boxchart, ttest2, sigstar
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿