フィルターのクリア

Boxplot with 5th and 95th percentile with multiple data sets

17 ビュー (過去 30 日間)
Sayantan Sahu
Sayantan Sahu 2017 年 7 月 31 日
コメント済み: Sayantan Sahu 2017 年 8 月 10 日
Hi,
I want to plot a boxplot with multiple datasets(4 years in my case). I did something like this.
data=[a;b;c;d];
group = [repmat({'2011'}, length(a), 1); repmat({'2012'}, length(b), 1); ... repmat({'2013'}, length(c), 1); repmat({'2014'}, length(d), 1)]
boxplot(data, group,... 'symbol','','factordirection','auto')
How do I make the whiskers 5th and 95th ?

回答 (1 件)

Abhi Sundararaman
Abhi Sundararaman 2017 年 8 月 2 日
You could use the "whisker" parameter in the "boxplot" function. i.e
boxplot(data, group,... 'symbol','','factordirection','auto', 'whisker', multiplier)
According to the following answers post ( here ), the multiplier for 95 percentile is 0.7193. Check the linked answers post has some more details.
  1 件のコメント
Sayantan Sahu
Sayantan Sahu 2017 年 8 月 10 日
Do I have mention separately for 5th percentile ? Also when I calculate separately the percentiles for each dataset, they do not match with that on the figure ? What is the best way to plot a boxplot with multiple datasets and with whiskers being 5th and 95th percentile ?

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

Community Treasure Hunt

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

Start Hunting!

Translated by