theme_jml | R Documentation |
Can be called as a function from this package, or can be loaded from a Github gist containing the same code.
theme_jml(
base_size = 11,
base_family = "sans",
labels_color = "black",
axis_color = "black",
bg_color = "transparent",
grid_color = "grey90",
legend.position = "bottom"
)
library(tidyverse)
pl_mtc <- mtcars |>
ggplot(aes(cyl, mpg)) +
geom_point()
pl_mtc + theme_gray()
pl_mtc + theme_classic()
pl_mtc + theme_jml()
#OGTT example:
data("ogtt_nested")
ogtt_long <-
ogtt_nested |>
select(id, ogtt_df) |>
unnest(cols = ogtt_df) |>
group_by(id)
pl_ogtt <- ogtt_long |>
ggplot(aes(time, glucose, group=id)) +
geom_line(alpha=0.3)
pl_ogtt + theme_jml()
#' to make this the active theme for all plots:
theme_set(theme_jml())
pl_ogtt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.