View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

5.0 | 1 rating Rate this file 6 Downloads (last 30 days) File Size: 18 KB File ID: #33658 Version: 1.19
image thumbnail




07 Nov 2011 (Updated )

Plot mean ± SD alongside jittered raw data

| Watch this File

File Information

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.

Required Products MATLAB
MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
03 Nov 2012 oyvey

oyvey (view profile)

Down with bar graphs! Errorbarjitter rules!

10 Nov 2011 Shatrughan

Please check your file before you upload !!

Comment only
11 Nov 2011 1.2

Original file disappeared.

04 Oct 2012 1.3

Added ability to plot single category of data.

04 Oct 2012 1.4

Added ability to plot single category of data.

17 Oct 2012 1.5

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

30 Oct 2012 1.6

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

31 Oct 2012 1.7

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

10 Dec 2012 1.8

Added option to control size of markers.

12 Dec 2012 1.9

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

16 Jan 2013 1.10

Bug fix to plot mean symbols in color

13 May 2013 1.11

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.

14 May 2013 1.13

Bug fix for plotting horizontal SDs

27 Nov 2013 1.14

Clarified help

23 Dec 2013 1.15

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.

08 Jan 2014 1.16

Bug fix when plotting with colormap

08 May 2014 1.17

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

08 May 2014 1.18

Minor improvements to instructions

14 May 2014 1.19

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

Contact us