File Exchange

image thumbnail

boxPlots

version 1.1.0.0 (8.36 KB) by Fabricio Castro
boxplots

10 Downloads

Updated 15 Mar 2018

View Version History

View License

This function generates a nice looking boxplot graph.

Cite As

Fabricio Castro (2021). boxPlots (https://www.mathworks.com/matlabcentral/fileexchange/66442-boxplots), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Ivonne Trebs

Hello,

I am getting this error:

Error using rectangle
Value must be numeric and finite

Error in boxPlots (line 110)
rectangle('Position',[((xWidthSub*(i+Sets*(j-1)))-((xWidthSub*0.8)/2)),firstQuartile,xWidthSub*0.8,(thirdQuartile-firstQuartile)],...

Can this be fixed?

Ivonne

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

Cheers!

Jose

Radim

Does not work for smaller dataset.
Fix:
- 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

Joana

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)
'FaceColor',convertColorRange(colors(i,:)),...

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!