plots: Change color palette
Change color palette to "lancet".
This commit is contained in:
parent
63c2883c7e
commit
c012fc65fe
2
secmal.R
2
secmal.R
@ -80,7 +80,7 @@ sma_plot_secmal_cmprsk <- function() {
|
||||
cpr <- cuminc(secmal$time_at_risk / 365.25, secmal$time_at_risk_status)
|
||||
ggcompetingrisks(cpr[1], conf.int = TRUE, multiple_panels = FALSE,
|
||||
legend = "none", title = "", ylim = c(0:1),
|
||||
xlab = "Years")
|
||||
xlab = "Years", ggtheme = theme_bw(), palette = "lancet")
|
||||
}
|
||||
|
||||
# Calculate cumuative risk with ci from cuminc.
|
||||
|
||||
@ -40,6 +40,7 @@ sma_plot_surv_asct <- function() {
|
||||
risk.table = "abs_pct",
|
||||
legend = "none",
|
||||
xlab = "Years",
|
||||
palette = "lancet",
|
||||
ggtheme = theme_bw())
|
||||
}
|
||||
|
||||
@ -80,6 +81,7 @@ sma_plot_surv_sm <- function() {
|
||||
break.time.by = 365.25,
|
||||
legend = "none",
|
||||
xlab = "Years",
|
||||
palette = "lancet",
|
||||
ggtheme = theme_bw())
|
||||
}
|
||||
|
||||
|
||||
1
utils.R
1
utils.R
@ -7,6 +7,7 @@ library(survival)
|
||||
library(survminer)
|
||||
library(tidyverse)
|
||||
library(cmprsk)
|
||||
library(ggsci)
|
||||
|
||||
#
|
||||
# Write plot to filename
|
||||
|
||||
@ -70,7 +70,10 @@ sma_jitt_dx_year <- function() {
|
||||
ggplot(data, aes(x = asct_year, y = dx, colour = dx, fill = dx)) +
|
||||
geom_jitter(width = 0.4, height = 0.2) +
|
||||
labs(x = "Year", y = "Diagnosis") +
|
||||
theme_bw() +
|
||||
theme(legend.position = "none") +
|
||||
scale_color_lancet() +
|
||||
scale_fill_lancet() +
|
||||
xlim(1990, 2020)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user