'How to hide (or remove) dots in the boxplot graph?
I have a question about how to hide(or remove) dots in the boxplot graph.
This is code what I implemented.
install.packages("randomForestSRC")
install.packages("ggRandomForests")
library(randomForestSRC)
library(ggRandomForests)
data(pbc, package="randomForestSRC")
pbc.na <- na.omit(pbc)
set.seed(123)
rsf <- rfsrc(Surv(days,status)~., data=pbc.na, ntree=500, importance=T)
gg_v <- gg_variable(rsf, time = c(2000, 4000),
time.labels = c("2000 days", "4000 days"))
gg_v$stage <- as.factor(gg_v$stage)
plot(gg_v, xvar="stage", panel=T, points=F)+
ggplot2::theme_bw() +
ggplot2::geom_boxplot(outlier.shape=NA)+
ggplot2::labs(y="Survival (%)")+
ggplot2::coord_cartesian(ylim=c(-.01, 1.02))
So I would like to hide(or remove) all of the event's dots (both of False and True).
However, I have no information about what I want.
Please let me know how to do it.
Thanks always.

Solution 1:[1]
You can also use the function "geom_boxplot2" from github ("Ipaper")
# devtools::install_github('kongdd/Ipaper')
library(Ipaper)
library(ggplot2)
ggplot(gg_v, aes(stage, yhat, group = stage)) +
geom_boxplot2(width = 0.8, width.errorbar = 0.5)+
facet_wrap(~time, nrow = 2, strip.position = "right") +
ylab("Survival (%)") +
theme_bw()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | learners |
