![](/img/trans.png)
[英]How to remove whiskers from geom_boxplot() when called from a ggplotly() function
[英]ggthemes::geom_tufteboxplot - prevent whiskers from extending to extremes
有人知道如何防止ggthemes::geom_tufteboxplot
的“胡须”被绘制到极值? 我尝试更改outlier
和whisker
参数无济于事。
library(ggplot2)
library(ggthemes)
ggplot(iris, aes(Species, Sepal.Length)) +
geom_boxplot()
晶须像往常一样扩展到 1.5xIQR:
ggplot(iris, aes(Species, Sepal.Length)) +
geom_tufteboxplot()
“晶须”延伸至极值
由reprex 包(v0.3.0) 于 2020 年 3 月 3 日创建
通过将 stat 更改为“boxplot”,我能够找到可行的解决方案。 这是一个 reprex(最后一个示例显示了如何隐藏异常值,尽管轴范围仍会考虑它们;解决方法更复杂):
library(ggplot2)
library(ggthemes)
ggplot(iris, aes(Species, Sepal.Length)) +
geom_boxplot()
ggplot(iris, aes(Species, Sepal.Length)) +
ggthemes::geom_tufteboxplot(stat = "boxplot")
ggplot(iris, aes(Species, Sepal.Length)) +
ggthemes::geom_tufteboxplot(stat = "boxplot", outlier.shape = NA)
由reprex 包(v0.3.0) 于 2020 年 5 月 29 日创建
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.