[英]How to remove outlier based on manual threshold in ggplot geom_boxplot
[英]geom_boxplot: change outlier rules
如何更改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))
})
查看geom_boxplot()
的coef
参数。 默认为1.5并根据coef
和四分位数范围设置晶须的长度,晶须外的所有点都被视为异常值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.