errorbarjitter

Plot mean ± SD alongside jittered raw data
726 Downloads
Updated 14 May 2014

View License

This command plots the mean (or median) ± SD of one or more samples alongside the raw data. The raw data are "jittered". In data arrays, samples are in rows, categories are in columns. There can be differences in sample sizes between categories. Several parameters of the plot can be altered at the command line, including plotting mean to the left or right of the raw data and plotting SD with or without caps. Categories can be sorted in ascending order by mean (or median). Category names are provided in separate cell array (colheaders). "data" and "colheaders" are the default names for data imported from an Excel file.

Cite As

David Stern (2024). errorbarjitter (https://www.mathworks.com/matlabcentral/fileexchange/33658-errorbarjitter), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on View and Analyze Simulation Results in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.19.0.0

Very minor improvements and bug fixes. Now clears figure before replotting and plots bar ends in correct color.

1.18.0.0

Minor improvements to instructions

1.17.0.0

Fixed bug that caused failure to plot data when not using colormap

1.16.0.0

Bug fix when plotting with colormap

1.15.0.0

Added two options.
1 - Plot data with colormap using matrix of dimensions equal to original data.
2 - Added option to plot data alone, without the average and error bars.

1.14.0.0

Clarified help

1.13.0.0

Bug fix for plotting horizontal SDs

1.11.0.0

1 - Plot horizontal lines corresponding to user-defined # standard deviations of first sample (e.g. control sample)
2 - Delete outliers on each sample using Grubb's test.

1.10.0.0

Bug fix to plot mean symbols in color

1.9.0.0

Now plots with tight X axis.
Added ability to pass axis handle.

1.8.0.0

Added option to control size of markers.

1.7.0.0

1 - Option to save figure without viewing
2 - Changed input format to handle many variables
3 - Control colors of point, averages, and lines separately
4 - Plot using regular Matlab symbols

1.6.0.0

Fixed bugs that resulted from addition of ability to plot error bars on each point and color points

1.5.0.0

1 - Fixed bug that caused crash when sorting multiple columns with the same mean
2 - Added ability to plot error bars on each sample
3 - Added ability to plot different groups with different colors

1.4.0.0

Added ability to plot single category of data.

1.3.0.0

Added ability to plot single category of data.

1.2.0.0

Original file disappeared.

1.0.0.0