set_styles: Change default styles for plots.

Description Usage Arguments Value Examples

View source: R/env_functions.R

Description

Change default styles for plots.

Usage

1
set_styles(styles_df)

Arguments

styles_df

data frame with columns 'fill' and 'stroke'. Rows represent subsequent styles which names can be passed to plotting functions, usually as styles argument.

Value

No return value, called for side effects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
styles_df <-
  rbind(
  actual = c("rgb(64,64,64)", "rgb(64,64,64)"),
  previous =
    c("rgb(166,166,166)", "rgb(166,166,166)"),
  forecast =
    c("url(#diagonalHatch)", "rgb(64,64,64)"),
  plan = c("white", "rgb(64,64,64)"),
  total_white = c("white", "white")
  )
colnames(styles_df) <- c("fill", "stroke")

set_styles(styles_df)

tidycharts documentation built on Jan. 18, 2022, 5:07 p.m.