an arbitrary function defining a transformation of the survival
curve. For example use function(y)y*100. Often used transformations can be
specified with a character argument instead: "event" plots cumulative events
(f(y) = 1-y), "cumhaz" plots the cumulative hazard function (f(y) =
-log(y)), and "cloglog" creates a complimentary log-log survival plot (f(y)
= log(-log(y)) along with log scale for the x-axis).
color
color to be used for the survival curves. This argument is
ignored when the number of strata (groups > 1). In this case, use the
argument palette.
palette
the color palette to be used. Allowed values include "hue" for
the default hue color scale; "grey" for grey color palettes; brewer palettes
e.g. "RdBu", "Blues", ...; or custom color palette e.g. c("blue", "red").
break.time.by
numeric value controlling time axis breaks. Default value
is NULL.
surv.scale
scale transformation of survival curves. Allowed values are
"default" or "percent".
conf.int
logical value. If TRUE, plots confidence interval.
conf.int.fill
fill color to be used for confidence interval.
censor
logical value. If TRUE, censors will be drawn.
pval
logical value. If TRUE, the p-value is added on the plot.
pval.size
numeric value specifying the p-value text size. Default is 5.
pval.coord
numeric vector, of length 2, specifying the x and y
coordinates of the p-value. Default values are NULL.
a vector of length 3
indicating respectively the size (e.g.: 14), the style (e.g.: "plain",
"bold", "italic", "bold.italic") and the color (e.g.: "red") of main title,
xlab and ylab and axis tick labels, respectively. For example font.x =
c(14, "bold", "red"). Use font.x = 14, to change only font size; or use
font.x = "bold", to change only font face.
xlim, ylim
x and y axis limits e.g. xlim = c(0, 1000), ylim = c(0, 1).
legend
character specifying legend position. Allowed values are one of
c("top", "bottom", "left", "right", "none"). Default is "top" side position.
to remove the legend use legend = "none". Legend position can be also
specified using a numeric vector c(x, y); see details section.
legend.title
legend title.
legend.labs
character vector specifying legend labels. Used to replace
the names of the strata from the fit. Should be given in the same order as
those strata.
risk.table
logical value specifying whether to show risk table. Default
is FALSE.
risk.table.title
Title to be used for risk table.
risk.table.col
color to be used for risk table. Default value is
"black". If you want to color by strata (i.e. groups), use risk.table.col =
"strata".
risk.table.fontsize
font size to be used for the risk table.
risk.table.y.text
logical. Default is TRUE. If FALSE, risk table y axis tick labels will be hidden.
risk.table.y.text.col
logical. Default value is FALSE. If TRUE, risk
table tick labels will be colored by strata.
risk.table.height
the height of the risk table on the grid. Increase
the value when you have many strata. Default is 0.25. Ignored when
risk.table = FALSE.
surv.plot.height
the height of the survival plot on the grid. Default
is 0.75. Ignored when risk.table = FALSE.
ggtheme
function, ggplot2 theme name. Default value is survminer::theme_classic2().
Allowed values include ggplot2 official themes: theme_gray(), theme_bw(),
theme_minimal(), theme_classic(), theme_void(), ....
...
other arguments to be passed to ggplot2 geom_*() functions such as
linetype, size, ...
x
an object of class ggsurvplot
Details
legend position: The argument legend can be also a
numeric vector c(x,y). In this case it is possible to position the legend
inside the plotting area. x and y are the coordinates of the legend box.
Their values should be between 0 and 1. c(0,0) corresponds to the "bottom
left" and c(1,1) corresponds to the "top right" position. For instance use
legend = c(0.8, 0.2).
Value
return an object of class ggsurvplot which is list containing two
ggplot objects, including: