# Ignore, please (uninformed question)

**URL:** <https://discourse.julialang.org/t/ignore-please-uninformed-question/93390>\
**Category:** Statistics\
**Tags:** statsplots\
**Created:** [January 23, 2023, 10:15am UTC](https://discourse.julialang.org/t/ignore-please-uninformed-question/93390 "2023-01-23T10:15:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Post date:** [January 23, 2023, 10:15am UTC](https://discourse.julialang.org/t/ignore-please-uninformed-question/93390/1 "2023-01-23T10:15:01Z")

</div>

In the course of preparing materials to explain boxplots to students, I am seeing something odd with the whiskers in a boxplot. The code

```julia
## example box
X = randn(100)
M = median(X)
Q1 = quantile(X,0.25)
Q3 = quantile(X,0.75)
IQR = iqr(X)
boxplot(X,label=:none,title="example boxplot", outliers=false)
scatter!([1.], [M],label="median")
scatter!([1.], [Q1],label="Q1")
scatter!([1.], [Q3],label="Q3")
scatter!([1.], [Q1-1.5*IQR],label="Q1-1.5IQR")
scatter!([1.], [Q3+1.5*IQR],label="Q3+1.5IQR"

```

generates the plot  
 ![boxplot](https://global.discourse-cdn.com/julialang/original/3X/e/1/e1204540bd53c0bea41935028528ae466a7ba993.png)

What I do not understand is why the points labeled Q1-1.5IQR and Q3+1.5IQR do not lie exactly at the same height as the whiskers. The boxplot code in StatsPlots.jl uses 1.5 as the default whisker\_range.

---

<div class="post-metadata">

**Author:** ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Post date:** [January 23, 2023, 10:32am UTC](https://discourse.julialang.org/t/ignore-please-uninformed-question/93390/3 "2023-01-23T10:32:28Z")

</div>

Oops, sorry, the whiskers go to the data point that lies within that distance, not the whole distance.
