【问题标题】:How to indicate the points on a Box Plot using R如何使用 R 指示箱线图上的点
【发布时间】:2025-12-02 06:05:02
【问题描述】:

我在 R 中使用以下内容从给定的数据集生成箱线图:

boxplot(set5, col=c(3,4), names=c("5 observation box plot"))

我还想在 Boxplot 上绘制特定点。目前,我只有四分位框生成的点,但没有显示实际的点。如何做到这一点?

【问题讨论】:

    标签: r points boxplot


    【解决方案1】:

    你的意思是这样的吗?:

    d<-rnorm(30)
    boxplot(d)
    points(rep(1,length(d)),d)
    

    【讨论】:

    • 是的,这就是工作:)