小编Car*_*hen的帖子

如何绘制一个箱形图,其订书钉在R中看起来像一个方括号

如何绘制这样的方框图:

由R绘制的盒子图

制作订书钉,数据标记在下/上四分位数的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")
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述


statistics r boxplot

3
推荐指数
1
解决办法
209
查看次数

标签 统计

boxplot ×1

r ×1

statistics ×1