如何绘制像这样的方框图:
制作订书钉,数据标记在下/上四分位数的1.5 IQR范围内,看起来像一个方括号。
我试过了:
bx = sapply(5:1, function(x) rnorm(100, x, sqrt(x)))
boxplot(bx, col = "gray", pch = "", boxwex = 0.3,
medlwd = rep(3, 4), medcol = rep("white", 4),
outlty = 1, outwex = 1,
whisklty = 1,
staplelty = 1, staplewex = 1,
names = paste0("mu = ", 5:1))
title(main = "n = 100")