View source: R/utils_plot_survHE.R
theme_survHE | R Documentation |
This theme is designed for use with survival analysis plots, particularly
those created using the survHE
package. It builds on theme_bw()
and
customizes axis text, titles, plot background, and legend styling.
theme_survHE()
Note: To position the legend inside the plot, use an additional call to
theme(legend.position = c(x, y), legend.justification = c("left", "top"))
.
A ggplot2 theme object that can be added to a ggplot.
library(ggplot2)
library(survHE)
ggplot(mtcars, aes(wt, mpg)) +
geom_point() +
theme_survHE() +
theme(legend.position = c(0.6, 0.8), legend.justification = c("left", "top"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.