I have x = rand (1000,6); y = Rand (1000.6); D (:, 1: 2: 12) = x; D (:, 2: 2: 12) = y;
I would like to build a grouped boxplot , where x (:, i) and y (:, i) are grouped squares (or pairs of factors). But it does not seem to be able to determine how to specify the groupings.
In this way:
figure('color',[1,1,1]); boxplot(D,'factorgap',10,'color','rk') axis([0 25 -1 5]) set(gca,'xtick',1.8:4.3:50) set(gca,'ytick',0:10) set(gca,'xticklabel',{'Direct care','Housekeeping','Mealtimes','Medication','Miscellaneous','Personal care'}) ylabel('Normalised Y'); legend(findobj(gca,'Tag','Box'),'HBN04-01 multibed','YAB single ')

But it looks a little untidy, how can I get the gaps between the pairs of drawers more?
source share