File Exchange

image thumbnail

Boxplot: boxplotx without toolboxes

version (76.4 KB) by Bill Whiten
Boxplot: boxplotx Quartiles box, 1% whiskers, & outliers


Updated 23 Mar 2016

View License

boxplotx(data) gives boxplots without need for statistics package.
Data can be a vector, matrix, or cell array of vectors.
NaNs can be in data and vectors can be of differing lengths.
Options allow position, width and colour of boxplots to be set.

Set hold on, then additional boxplots can be added.

Box limits and whisker end values can be changed.

Cite As

Bill Whiten (2020). Boxplot: boxplotx without toolboxes (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)


Works well. I had an odd situation where one of my boxplot datasets had repeated observations with the same value and this caused problems at line 248 of the m-file. I edited the '<' symbol to be '<=' and it fixed the problem. i.e. to fix the problem, line 148 should read: bars5=data(sum(data<=bars3+bar*(bars4-bars3)));
Thanks for providing this useful file!

Adrian Diaz Alvarez

Zack Whitlow

Very easy to use!

Bill Whiten

Diz: Have you seen the example file and tried Matlab command "doc boxplotx" (gives initial lines of boxplotx)
Also try some cases on sample data.


Hi there,

does anybody have a few examples of boxplotx usage?



MATLAB Release Compatibility
Created with R2016a
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!