File Exchange

image thumbnail

multiple_boxplot.m

version 1.2.0.0 (1.72 KB) by Ander Biguri
Grouped boxplots matlb ploting function

32 Downloads

Updated 15 Jul 2014

View License

This boxplot function plots grouped boxes, for more advanced statistical analysis.
Features:
-In each boxplot different amount of data supported
-Any amount of groups and boxplot per group supported
-Xlabel and boxplotlabel supported
-Automatic choice of colors or user specified colors
Example of use:

clear;clc;
% Create example data
A=rand(100,10);
B=rand(200,10);
C=rand(150,10);

% prepare data
data=cell(10,3);
for ii=1:size(data,1)
Ac{ii}=A(:,ii);
Bc{ii}=B(:,ii);
Cc{ii}=C(:,ii);
end
data=vertcat(Ac,Bc,Cc);

xlab={'Hey','this','works','pretty','nicely.','And','it','has','colors','!!!!'};
col=[102,255,255, 200;
51,153,255, 200;
0, 0, 255, 200];
col=col/255;

multiple_boxplot(data',xlab,{'A', 'B', 'C'},col')
title('Here it is!')

Comments and Ratings (5)

Yubo Fan

JW

Weizhe Chen

Catherine is right. But it doesn't matter. Thanks!

Vidz

Catherine

Hi Ander,

In the preamble of the function you mention that "data is a cell matrix of MxL", but later in the code, you write :

M=size(data,2);
L=size(data,1);

In the MATLAB language, the first dimension is the number of rows, and the second the number of columns. The description in the preamble is thus misleading.

Updates

1.2.0.0

Example of use added

1.1.0.0

Brief description

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux