gp_footer: gp_footer

View source: R/gp_footer.R

gp_footerR Documentation

Description

Add a Galactic Polymath footer to the bottom of ggplot objects

Usage

gp_footer(
  obj,
  caption = NULL,
  x = 0.015,
  y = 0.05,
  text_size = 9,
  border_col_graph = "#363636",
  border_col_foot = "#363636",
  border_width_graph = 1,
  border_width_foot = 1,
  text_col = "#363636",
  data_attrib = NULL,
  data_attrib_prefix = "Data: ",
  data_attrib_scale = 0.9,
  data_attrib_x = 0.75,
  logo = "black",
  logo_scale = 0.7,
  fill_col = "gray90",
  show_plot = TRUE,
  clear_cache = FALSE
)

Arguments

obj

ggplot object

caption

plot caption

x

x how much to inset caption as a fraction; default=0.01

y

y height of box as a fraction; default=0.08;

text_size

text size; default=9;

border_col_graph

color of border around main plot. default="#363636"; put "transparent" to remove border

border_col_foot

color of border around plot footer. default="#363636"; put "transparent" to remove border

data_attrib

concise citation for data source (will be smaller font and follow "Data: ")

data_attrib_prefix

How to prefix data_attrib text. By default "Data: "

data_attrib_scale

default=0.6 from 0 to 1, how much smaller to scale attribution text?

data_attrib_x

where do you want to place the right edge of the data attribution text (0 to 1); default= 0.75

default="black"; which GP logo do you want to use?

logo_scale

on a scale of 0 to 1 (npc units), how high to make the logo in footer? default=0.7

fill_col

fill color for caption at bottom; default is "gray90"

show_plot

logical; plot resulting figure? default=T

text_color

text color; default="#363636" aka Galactic Black


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.