Commit 61fa3053 authored by Tom's avatar Tom

boxplot fix

parent 4f074dc7
......@@ -59,8 +59,13 @@ wdth = yl(2)*0.5;
% 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]);
github% info for making boxplot
quartiles = quantile(X, [0.25 0.75 0.5]);
iqr = quartiles(2) - quartiles(1);
Xs = sort(X);
whiskers(1) = min(Xs(Xs > (quartiles(1) - (1.5 * iqr))));
whiskers(2) = max(Xs(Xs < (quartiles(2) + (1.5 * iqr))));
Y = [quartiles whiskers];
% raindrops
h{2} = scatter(X, jit - yl(2)/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