theme_industRial {industRial}R Documentation

Custom theme "industRial" for the book industRial Data Science plots

Description

This theme aims at optimal balance between readability and precision. It has adapted from the package cowplot by Claus O.Wilke and reflects the principles of his book Fundamentals of Data Visualization

Usage

theme_industRial(
  font_size = 14,
  font_family = "",
  line_size = 0.5,
  rel_small = 12/14,
  rel_tiny = 11/14,
  rel_large = 16/14,
  base_size = font_size,
  base_family = font_family
)

Arguments

font_size

defaults to 14

font_family

defaults to ""

line_size

defaults to 0.5

rel_small

defaults to 12/14

rel_tiny

defaults to 11/14

rel_large

defaults to 16/14

base_size

internal arguments, defaults to font_size

base_family

internal arguments, defaults to font_family

Details

Apply this theme by adding it at the end of the code of any ggplot chart. It basically combines the half open theme with a grid background from cowplot

Value

This function returns an object of classes theme and gg from the ggplot2 package

References

For a complete case study application refer to https://j-ramalho.github.io/industRial/

Examples

library(dplyr)
library(ggplot2)

pet_delivery %>% 
   ggplot(aes(x = A)) +
   geom_histogram(color = "grey", fill = "grey90") +
   labs(title = "PET clothing case study",
      subtitle = "Raw data plot",
      x = "Treatment",
      y = "Tensile strength [MPa]") +
      theme_industRial()

[Package industRial version 0.1.0 Index]