Code covered by the BSD License  

Highlights from
Alternative box plot

4.0 | 1 rating Rate this file 30 Downloads (last 30 days) File Size: 7 KB File ID: #46545
image thumbnail

Alternative box plot



08 May 2014 (Updated )

Draw a box plot with sub-grouping and/or arbitrary box spacing

| Watch this File

File Information

An alternative implementation of Matlab's boxplot function, with a slightly different interface. The function allows boxes to be arbitrarily spaced, sub-grouped data to be plotted, and various display parameters to be modified. No toolboxes required.
Note: requires quantile2.m from

MATLAB release MATLAB 8.0 (R2012b)
MATLAB Search Path
Other requirements Requires quantile2.m from
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
22 Aug 2014 Christopher Hummersone

There's example code in the file help...

Comment only
20 Aug 2014 Juan Deaton

Can you attach the code example for the figure you have at the top?

Comment only
12 Jun 2014 Christopher Hummersone

@Alberto you mean the box colour? Use the 'boxColor' option and set it, for example, to [1 1 1; .5 .5 .5] (assuming you have two boxes per y-tick). Setting parameters for each group is described towards the bottom of the help text.

Comment only
11 Jun 2014 Alberto

Nice function, it works as promise. I miss the option , (or i don't know how to do it ) to fill the notch with a specified color like on the figure example.

09 May 2014

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

12 May 2014

Moved quantile calculation to new function.

14 May 2014

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

23 Apr 2015

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

Contact us