| set_plot_theme | R Documentation |
This function sets a coherent plot theme for functions.
set_plot_theme(font = "Arial")
font |
Font family to use for text elements. Default: "Arial". |
No return value, used as theme for ggplots
if (rlang::is_installed(pkg = c("showtext", "systemfonts",
"sysfonts", "curl"))) {
ggplot2::ggplot(
data = datasets::mtcars,
mapping = ggplot2::aes(
x = .data[["wt"]],
y = .data[["mpg"]],
color = as.factor(x = .data[["cyl"]])
)
) +
ggplot2::geom_point(
size = 4L
) +
OlinkAnalyze::set_plot_theme()
ggplot2::ggplot(
data = datasets::mtcars,
mapping = ggplot2::aes(
x = .data[["wt"]],
y = .data[["mpg"]],
color = as.factor(x = .data[["cyl"]])
)
) +
ggplot2::geom_point(
size = 4L
) +
OlinkAnalyze::set_plot_theme(
font = ""
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.