我使用的例子从网站,但我想删除点,使只有连接的中位数仍然存在。
我的准则。
# for reproducibility
set.seed(123)
library(ggstatsplot)
df_disgust <- dplyr::filter(bugs_long, condition %in% c("LDHF", "HDHF"))
p2 <-
ggstatsplot::ggwithinstats(
data = df_disgust,
x = condition,
y = desire,
xlab = "Condition",
ylab = "Desire to kill bugs",
type = "np",
conf.level = 0.99,
title = "Non-parametric Test",
package = "ggsci",
palette = "uniform_startrek",
point.args = list(size = 0, alpha = 0.5),
point.path = FALSE,
centrality.plotting = TRUE,
outlier.tagging = T,
ggtheme = ggthemes::theme_map()
)
ggstatsplot::combine_plots(
plotlist = list(p2),
plotgrid.args = list(nrow = 2),
annotation.args = list(
title = "Effect of disgust on desire to kill bugs ",
caption = "Source: Bugs dataset from `jmv` R package"
)
)
负责点的参数,我理解为point.args = list(size = 3, alpha = 0.5),
,但当我设置size = 0
时,点不会消失。
我没有发现任何其他参数会导致这些点
1条答案
按热度按时间lyr7nygr1#
您可以仅将各个几何层的透明度设置为0。
由reprex package(v2.0.1.9000)于2022年5月13日创建