File Exchange

image thumbnail


version (8.36 KB) by Fabricio Castro


Updated 15 Mar 2018

View Version History

View License

This function generates a nice looking boxplot graph.

Cite As

Fabricio Castro (2021). boxPlots (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Ivonne Trebs


I am getting this error:

Error using rectangle
Value must be numeric and finite

Error in boxPlots (line 110)

Can this be fixed?


Hi Fabricio

Consider to introduce limits for (skewed - asymmetric) non-negative distributions. For instance, line 102 could be replaced by

min_ = max(0, firstQuartile-(1.5*(thirdQuartile-firstQuartile)))

and maybe in other parts of the code




Does not work for smaller dataset.
- for i=1:Sets
- fLabel=[fLabel,[featureLabels(i),featureLabels(i),featureLabels(i)]];
- end

+ for i=1:nFeaturesL
+ fLbl(1:Sets) = featureLabels(i);
+ fLabel=[fLabel,[fLbl]];
+ end


Here is the data for 4 data sets instead of all 15. Can you please help me to run your code on it, to plot the boxplots (3 vertical bars), for 4 data feature/datasets.?

Because when i run the code it also plots the values hogher than 100 on y-axis, which isn't true.

Mustapha Adamu

I get an error but I want to plot three datasets each with dim (144x72);

Cai Jie Cai

Fabricio Castro

If some bug raise please leave a comment bellow and you will be reported as soon as possible.

Enliang Guo

Undefined function or variable 'convertColorRange'.

Error in boxPlots (line 103)

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