[英]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.