boxplot / outlier: how to reduce outliers(boundry change)?

15 ビュー (過去 30 日間)
awda
awda 2014 年 5 月 2 日
コメント済み: awda 2014 年 5 月 4 日
Hey
We have this boxplot with our matrix we have attached to this post. the code is:
cst = x_weekday(:,:,2);
boxplot(cst');
the boxplot it givs is:
Question: The + signs is the outliers, but it looks like there is alot of those clumped together in 1 place. that is because it uses the default boundry of outlier that matlab provides. is it possible to change the outlier boundry so it has less outlier(+).
thanks

採用された回答

the cyclist
the cyclist 2014 年 5 月 2 日
Yes, by setting the "whisker" option. Compare these two figures:
rng(1)
x = randn(10000,5);
figure
boxplot(x)
figure
boxplot(x,'whisker',2)

その他の回答 (1 件)

awda
awda 2014 年 5 月 3 日
hi thanks..but there is no real difference..when i put my code...any better options to change the boundry?
  2 件のコメント
the cyclist
the cyclist 2014 年 5 月 3 日
Did you run my example? It actually makes quite a large difference in the number of outliers.
I just set the whisker to length 2, but you can make the whisker much larger if you want, to eliminate more outliers.
Read
doc boxplot
for all kinds of details on how you can change these things.
[Also, it would have been better if you had placed your remarks as a comment under my answer, rather than as its own separate "answer".]
awda
awda 2014 年 5 月 4 日
ok thanks :), i will try asap, and return to you :)

サインインしてコメントする。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by