boxplot median, position refinement
Show older comments
Hi I am trying to plot the tolerance spread between 3 different methods for two different company drawings as outlined in the picture. I like the boxes to be closer together and wider. I tried position but it didnt work. Apparently, boxplot creates the median line so is always in the middle. I would like the mean for each box and connect the mean points with a line
thanks

A=[...
0.0189 0.00839 0.01542 NaN 0.217 0.1865 0.1985;
-0.0303 -0.01979 -0.02682 NaN 0.107 0.1375 0.1255; ];
figure('color', 'w');
c = colormap(lines(3));
C = [c; ones(1,3); c]; % this is the trick for coloring boxes
boxplot(A, 'color', C, 'plotstyle', 'compact', ...
'labels', {'','STACK A','','','','STACK F',''});
hold on;
for ii = 1:3
plot('color', c(ii,:));
end
title('TOLERANCE SPREAD COMPARISON FOR GDOTs TDP');
ylabel('Tolerance (in)');
%xlabel('STACKS');
legend({'WC', 'RSS', 'MRSS'});
Answers (0)
Categories
Find more on Box Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!