boxplotGroup

バージョン 2.0.0 (360 KB) 作成者: Adam Danz
Group boxplots together along the x-axis with space between groups.
ダウンロード: 5.5K
更新 2021/4/27

ライセンスの表示

x = {rand(100,2), rand(20, 2), rand(150,2)};
boxplotGroup(x)

The lines above will create two groups of three boxplot boxes per group, with space separating the groups. You can control the amount of space between groups and you can add group labels.

See the example file for a variety of formatting options available. Most boxplot properties available in Matlab can be specified in this function, too. However, if you're working with boxplot's grouping variable 'g', use the syntax boxplot(x,g) along with the "Group Appearance" options described in Matlab's boxplot() documentation.

** Version 2.0**
As requested by several users, now you can set the color of boxplots by group or by members within each group (see example file).

Tested in Matlab r2016a, r2018b, and r2021a.

引用

Adam Danz (2024). boxplotGroup (https://www.mathworks.com/matlabcentral/fileexchange/74437-boxplotgroup), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2021a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
2.0.0

Examples file added; GroupType param added to control color distribution; output suppressed unless requested; improved linking of axes with SecondaryLabels; now xticks are set to auto if labels aren't provided; + other improvements.

1.2.2

Instead of creating a new axis when an axis handle is not provided, the current axis will be used via gca().

1.2.1

Suppress linkprops() and changes to toolbar suppression to work with versions prior to r2018b.

1.2.0

When 2nd axis is added, main axis is set to current axis.

1.1.0

Using linkprop and listener to resize axis2 when main axis is resized; axis handle provided in boxplot(); added DeleteFct to main axis; removed toolbar for axis2; other minor changes.

1.0.0