Add Tracking Footer

ggtrack(
  gg,
  qr_content = NULL,
  color = "black",
  color_bg = "white",
  caption = NULL,
  logo = NULL,
  order = "CLQ",
  positions = c(55, 25, 20),
  logo_justification = 1,
  qr_justification = 1,
  height_plot = 7,
  height_tracker = 1.8,
  add_git = TRUE,
  add_ts = TRUE,
  interactive = FALSE,
  plotly_heights = c(0.8, 0.2),
  ...
)

Arguments

gg

ggplot object to track

qr_content

character content passed to qrencode. A time stamp is automatically added plus the current git commit where available.

color

character color of the QR code

color_bg

character background color of QR code

caption

character or grob to add to footer. Text can be html or md and is passed directly to richtext_grob

logo

file to add to footer as a logo

order

character of length 3 defining placement order for "caption" (C), "logo" (L) and "QR" (Q) code. Must be one of:

  • CLQ

  • LCQ

  • QLC

  • CQL

positions

numeric vector of length 3, defining the horizontal proportion of each container. The 3 numbers must add to 100.

logo_justification

numeric between 0 and 1 passed to rasterGrob. See note below.

qr_justification

numeric between 0 and 1 passed to rasterGrob. See note below.

height_plot

numeric plot height in cm.

height_tracker

numeric tracker height in cm.

add_git

logical include git info in encoding

add_ts

logical include timestamp info in encoding

interactive

logical use plotly for interactivity

plotly_heights

numeric vector of length 2 to fix relative height of plot and tracking banner

...

options passed to theme in order to style the tracker banner.

Value

grid

Note

For Justification you need to imagine each element in its own rectangle with a bottom dimension of 0 to 1. If you want the logo or QR code on the right of the rectangle set justification to 1, or 0 for left.