Lower whisker and outliers not showing up on boxplot
이전 댓글 표시
I'm trying to make a boxplot with 9 boxes, and the lower whiskers and outliers are not displaying correctly. On the leftmost box, the lower whisker only appears when the whisker length is set to less than 1. I have the whisker length set to default, which is 1.5 times the interquartile range, but the other lower whiskers are much longer than that. Does anyone know why this might be happening?
Here is the code:
boxplot(Concentration, {Nutrient Source}, 'factorseparator',[1],'outliersize',[1],'symbol','ro','factorgap',[5 1]); %default whisker length
boxplot(Concentration, {Nutrient Source}, 'factorseparator',[1],'outliersize',[1],'symbol','ro','factorgap',[5 1],'whisker',[0.9]); %shorter whisker length
And here are the resulting boxplots:
답변 (1개)
Star Strider
2019년 7월 1일
0 개 추천
You’re using a logarithmic y-axis scale. If the whiskers are negative, they won’t plot. They should appear with the default settings on a linear y-axis scale, although the rest of the plot may then be difficult to interpret.
댓글 수: 2
Will McKettrick
2019년 7월 1일
Star Strider
2019년 7월 1일
I forgot about zero values, since they are likewise not defined on a logarithmic scale.
- The whiskers are lines extending above and below each box. Whiskers are drawn from the ends of the interquartile ranges to the furthest observations within the whisker length (the adjacent values).
so perhaps you’re seeing the normal behaviour.
I don’t routinely use box plots, and haven’t in a while. When I’ve used them, they did what I wanted.
카테고리
도움말 센터 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!