【问题标题】:geom_boxplot: change outlier rulesgeom_boxplot:更改异常值规则
【发布时间】:2018-03-29 14:45:18
【问题描述】:

如何更改 geom_boxplot 中的异常值规则?在boxplot中,我只需要设置range = 3。另外,如何设置lower和upper?

individual_SoA_plots <- lapply(individual_SoA_data,
                              function(x) {
                                ggplot(x, aes(x = x$GROUP, y =x$AgingOfAlert)) +
                                  geom_boxplot(ymin = 0, ymax = 162,
                                               col=" dark blue", fill = "green",
                                               outlier.colour = "#1F3552", outlier.shape = 20) +
                                  scale_y_continuous(name = "Aging Of Alerts") +
                                  scale_x_discrete(name = "Current State", limits = GROUPtype) +
                                  ggtitle(x$SourceOfAlert[1]) + theme_bw() +
                                  theme(text = element_text(size=10))
                              })

【问题讨论】:

标签: r ggplot2 outliers


【解决方案1】:

查看geom_boxplot()coef 参数。它默认为 1.5,并根据 coef 和四分位间距设置胡须的长度,胡须外的所有点都被视为异常值。

【讨论】:

    猜你喜欢
    • 2018-06-29
    • 2011-06-27
    • 2015-07-16
    • 2011-10-19
    • 1970-01-01
    • 2020-09-17
    • 2012-01-03
    • 2016-04-09
    • 1970-01-01
    相关资源
    最近更新 更多