knitr::opts_chunk$set( echo = TRUE, fig.width = 6, fig.height = 4, dpi = 150 )
library(tidyverse) library(here)
library(dunnr) # This command must be run once to register all fonts installed on Windows # extrafont::font_import(pattern = "Roboto") # This command must be run once in each R session to register fonts extrafont::loadfonts(device = "win", quiet = TRUE) theme_set(theme_td()) set_geom_fonts() set_palette()
ggplot(iris, aes(Sepal.Length, fill = Species)) + geom_density(alpha = 0.5) + scale_y_continuous(expand = expansion(c(0, 0.1))) + labs(title = "Example plot", subtitle = "theme_td with pastel6 palette") + theme(legend.position = c(0.7, 0.7)) + remove_axis()
Reproducibility receipt
Sys.time()
if ("git2r" %in% installed.packages()) { if (git2r::in_repository()) { git2r::repository() } }
sessioninfo::session_info()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.