Commit deb13204 authored by Tom Marshall's avatar Tom Marshall

spacing

parent 7a0be7e7
......@@ -21,33 +21,33 @@ set(h{1}, 'EdgeColor', [0.1 0.1 0.1]);
set(h{1}, 'LineWidth', 2);
% make some space under the density plot for the boxplot
yl = get(gca,'YLim');
set(gca,'YLim',[-2 yl(2)]);
yl = get(gca, 'YLim');
set(gca, 'YLim', [-2 yl(2)]);
% jitter for raindrops
jit = (rand(size(X)) - 0.5) * wdth;
% info for making boxplot
Y = quantile(X,[0.25 0.75 0.5 0.02 0.98]);
Y = quantile(X, [0.25 0.75 0.5 0.02 0.98]);
% raindrops
h{2} = scatter(X,jit - 1);
h{2}.SizeData = 5;
h{2} = scatter(X, jit - 1);
h{2}.SizeData = 10;
h{2}.MarkerFaceColor = cl;
h{2}.MarkerEdgeColor = 'none';
% 'box' of 'boxplot'
h{3} = rectangle('Position',[Y(1) -1-(wdth*0.5) Y(2)-Y(1) wdth]);
set(h{3},'EdgeColor','k')
set(h{3},'LineWidth',2);
h{3} = rectangle('Position', [Y(1) -1-(wdth*0.5) Y(2)-Y(1) wdth]);
set(h{3}, 'EdgeColor', 'k')
set(h{3}, 'LineWidth', 2);
% could also set 'FaceColor' here as Micah does, but I prefer without
% mean line
h{4} = line([Y(3) Y(3)],[-1-(wdth*0.5) -1+(wdth*0.5)],'col','k','LineWidth',2);
h{4} = line([Y(3) Y(3)], [-1-(wdth*0.5) -1+(wdth*0.5)], 'col', 'k', 'LineWidth', 2);
% whiskers
h{5} = line([Y(2) Y(5)], [-1 -1],'col','k','LineWidth',2);
h{6} = line([Y(1) Y(4)],[-1 -1],'col','k','LineWidth',2);
h{5} = line([Y(2) Y(5)], [-1 -1], 'col', 'k', 'LineWidth', 2);
h{6} = line([Y(1) Y(4)], [-1 -1], 'col', 'k', 'LineWidth', 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment