image thumbnail

notBoxPlot

version 1.31.0.0 (15.7 KB) by Rob Campbell
This function visualizes raw (grouped) data along with the mean, 95% confidence interval, and 1 SD.

15.5K Downloads

Updated 19 Oct 2020

From GitHub

View license on GitHub

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Whilst box plots have their place, it's sometimes nicer to see all the data, rather than hiding them with summary statistics such as the inter-quartile range. This function (with a tongue in cheek name) addresses this problem. The use of the mean instead of the median and the SEM and SD instead of quartiles and whiskers are deliberate. Jittered raw data are plotted for each group. Also shown are the mean, and 95% confidence intervals for the mean. This plotting style is designed to be used alongside parametric tests such as ANOVA and the t-test. Comparing the jittered data to the error bars provides a visual indication of whether the normality assumptions of the statistical tests are being violated. Furthermore, it allows one to eyeball the data to look for significant differences between means (non-overlapping confidence intervals indicate a significant difference at the chosen p-value, which here is 5%). Also see: http://jcb.rupress.org/cgi/content/abstract/177/1/7 Finally, 1 SD is also shown. Note that if data are not normally distributed then these statistics will be less meaningful.
The function has several examples and there are various visualization possibilities in addition to those shown in the above screenshot. For instance, the coloured areas can be replaced by lines.
Although it's worked well for situations I've needed it, I will be happy to modify the function if users come up against problems.
New features from March 2017:
Accepts LinearModel objects as a y variable; Accepts Table objects as a y variable; Examples are now in standalone files; Legacy call format removed; x variable does not need to be defined as empty when it isn't being used

See GitHub page for more details.

Cite As

Rob Campbell (2021). notBoxPlot (https://github.com/raacampbell/notBoxPlot), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.