darklyplot: Function to create a dark themed plot

Description Usage Arguments Examples

View source: R/darklyplot.R

Description

A dark themed plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
darklyplot(
  df,
  column,
  col = "white",
  n.decimals = 0,
  refline = FALSE,
  refValue = 0,
  refCol = NA,
  shade = FALSE,
  shadeCol = "dodgerblue",
  shadeAlpha = 0.15,
  minCol = "#6CB23F",
  maxCol = "#FD5305",
  firstCol = "white",
  lastCol = "#00AFEF",
  labelx = "round",
  Ndodge = 3
)

Arguments

df

input data frame requires input, must have a date column named date

column

input data column name to plot

col

color for line, defaults to "white"

n.decimals

number of decimals to display, default is 0

refline

include a reference line? default is FALSE

refValue

value for reference line, defaults to 0

shade

shade under the line? default is FALSE

shadeCol

color for shading under line default is "dodgerblue"

shadeAlpha

alpha (transparency) for shading, default is 0.15

minCol

color for minimum value

maxCol

color for maximum value

firstCol

color for first value

lastCol

color of last value

Ndodge

n.dodge parameter passed to scale_x_date(guide_axis(n.dodge = Ndodge)...)

labelX

function for labeling values, default is round, percent also available

Examples

1
2
darklyplot(mtg_rate,"rate",labelx="roundx",n.decimals=3)
darklyplot(mtg_rate,"rate",labelx="roundx",n.decimals=3,shade=TRUE,refline=TRUE)

lenkiefer/darklyplot documentation built on July 4, 2020, 12:04 a.m.