Alternative box plot

Draw a box plot with various display options

ダウンロード: 10.4K

更新 2018/5/5

GitHub から

GitHub でライセンスを表示

編集メモ: This file was selected as MATLAB Central Pick of the Week

NOTE: this function is now available from the IoSR Matlab Toolbox as iosr.statistics.boxPlot.
Alternative box plot function for Matlab with many options. These options include:
- Variable sample sizes (via the tab2box() function).
- Show box sample size.
- Scaled or uniform box spacing.
- Box width scaled by sample size.
- Overlay scatter plots of underlying data.
- Overlay the mean of the data.
- Overlay additional percentiles, and attach labels to them.
- Hierarchical X-labeling and support for multidimensional data.
- Notched boxes.
- Vertical lines to separate groups.
- Automated construction of a legend.
- Set box limits as percentiles.
- Set whisker extent via various methods.
- Use of weighted quantiles.
- Creation of violin plots.


Christopher Hummersone (2023). Alternative box plot (, GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2015a
Windows macOS Linux

ヒントを得たファイル: notBoxPlot, Hierarchically grouped boxplot

Community Treasure Hunt

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

Start Hunting!

GitHub の既定のブランチを使用するバージョンはダウンロードできません

バージョン 公開済み リリース ノート

Updated version number.
Updated description.
Added acknowledgement.
Moved function in to updated toolbox.
Function now natively supports sub-groups, handles NaNs more robustly, and returns sample size(s). A few other minor tweaks and doc changes.

Added percentile options for box and whisker extent. Modified help to clarify scatter plotting.
Moved file to Github.

Added 'theme' property to allow multiple display properties to be changed simultaneously. Various bug fixes.

More bug fixes. Forced legend alpha to match box alpha.

Added ability to specify colors as a colormap function. Changed some size properties to no longer be specifiable for each group. Bug fixes.

Re-implemented function as a class (with a new name). Added property to automate construction of a legend.

Added meanSize property.

Corrected calculation of mean when data include NaN. Updated picture.

Added options for displaying the means.

Added trap for MarkerEdgeAlpha (scatterAlpha), which older versions of Matlab do not support.

Added layer and transparency options.

Fixed automatic placement of boxes.

Corrected bug where x offset was erroneous if y was not hierarchical.

Small tweaks to improve robustness.

Numerous changes to interface in order to support multidimensional data and improve hierarchical data labelling. Added scaleWidth option to scale box widths according to sample size.

Added x-shaping to outliers and tweaked offset distribution.

Added x shaping for overlayed scatter plots whereby the random x offset is related to the data distribution. Fixed bug whereby xSeparator handle would be sought even if xSeparator was not specified.

Shuffled a few things around so that the creation order defines the layering, rather than relying on uistack(). Added linkprop() and listener to keep axes in sync and to change xseparator if ylim changes.

Added options to: overlay a scatter plot of the underlying data, display the sample size in each box, add x-group separators, and add hierarchical labelling. Shuffled outputs slightly. Thanks to Arnold for the suggestions.
Forgot to include tab2box.
Updated image.

Fixed bug where x is a cell array of strings.

Remove NaN from x data (and corresponding y data).

Updated documentation.

Improved robustness to small or empty samples. Add tab2box function for arranging tabular into the format accepted by box_plot.

Function now natively supports sub-groups, handles NaNs more robustly, and returns sample size(s). A few other minor tweaks and doc changes.

Moved quantile calculation to new function.

Changed/corrected quantile estimation algorithm. Details in help text.

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。