Skip to contents

A ggplot2 theme that includes bold face titles and neat facet themes.

Usage

theme_neat(base_size = 11, base_family = "")

Arguments

base_size

base font size, given in pts

base_family

base font family

Details

All ggplot2 theme text elements are set using ggtext::element_markdown allowing markdown syntax to be included in plot text elements such as the title or axis labels. See the example.

Examples

iris %>% 
  ggplot2::ggplot(ggplot2::aes(x = Sepal.Length,
                               y = Sepal.Width,
                               fill = Species)) +
  ggplot2::geom_point(size = 3,
                      shape = 21) +
  ggplot2::facet_wrap(~Species) +
  ggplot2::labs(title = 'Another *Iris* dataset plot',
                subtitle = 'As an **example**',
                caption = ' A caption that includes some **markdown**',
                x = 'Sepal length',
                y = 'Sepal width') +
  theme_neat()