Skip to contents

The emwthemes package is designed for personal use.

Acknowledgements

Several functions are based on code from other packages. License information and attributions are included where appropriate.

Installation

You can install the development version of emwthemes from GitHub with:

# install.packages("devtools")
devtools::install_github("emmarshall/emwthemes")

Package helper functions

update_geom_fonts_em: Update font defaults for text geoms to use handwritten font

add_logo: easily add logo to plot

link_to_img: processes image from url for use with ggimage()

link_to_img: processes image from url for use with ggimage()

Fonts & Colors

See vignette.

Themes use two different color palette:

scales::show_col(emwthemes:::br_pal()(9))
scales::show_col(emwthemes:::ft_pal()(9))

Personal Color Palette (default for theme_emw())

Personal Scale colors

Bright Color Palette (default for theme_emw_dark())

Bright Scale colors

Discrete and Continuous Scale

Examples

You can find the code for all the examples below in the “Examples” Vignette on the Package Website.

Examples


line +
  theme_em()
Example plot with theme_em()

Dark Theme


line +
  theme_em_dark()
Example plot with theme_em_dark()

Bar Charts


bar_light +
  theme_em()

Example bar plot with theme_em()

bar_dark +
  theme_em_dark()

Example bar plot with theme_em_dark()

bar_light +
  theme_emw(grid="Y")

Example bar plot with theme_emw()

bar_dark +
  theme_emw_dark(grid="Y")

Example bar plot with theme_emw_dark()

Alternate, more professional option with built in ability to use ggtext::markdown_elements

Using theme_em to print a scatter plot with width = 12 inches & height = 8 inches and the md = TRUE argument to use ggtext::element_markdown() instead of element_text() for text elements, in this case the subtitle:

Example plot with theme_em_dark()