4
我有x = rand(1000,6); Y =蘭特(1000,6); d(:,1:2:12)= X; d(:,2:2:12)= Y;分組boxplot matlab
我想繪製一個分組boxplot
其中x(:,i)和y(:,i)是分組的盒形圖(或因子對)。但似乎無法解決如何指定分組。
這樣:
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 ')
但它看起來有點凌亂,我如何才能對箱線圖之間的差距較大?