Skip to contents

Add a logo to your plot or image This function places a logo at one of the corners of your image/plot

Usage

add_logo(
  plot_path,
  logo_path = c("brookings", "es", "gs", "fp", "metro", "global", "bi", "bc", "cc",
    "ccf", "ceaps", "cepm", "chp", "cmep", "csd", "cti", "crm", "cue", "cuse", "doha",
    "hc", "thp", "tsinghua"),
  logo_position = "bottom right",
  logo_scale = 5,
  height_padding = 0.045,
  width_padding = 0.02
)

Arguments

plot_path

url or local file for the plot

logo_path

url, local file for the logo, or one of the built in logos. Can be a character string in c('brookings','es', 'gs', 'fp', 'metro', 'global', 'bi', 'bc', 'cc', 'ccf', 'ceaps', 'cepm', 'chp', 'cmep', 'csd', 'cti', 'crm', 'cue', 'cuse', 'doha', 'hc', 'tsinghua')

logo_position

Optional. Valid options are 'top left', 'top right', 'bottom left', and 'bottom right'. Default logo position is 'bottom right'.

logo_scale

Optional. The portion of the plot width the logo should occupy. The default is 5 which means that the logo will be 1/5th of the plot width.

height_padding

Optional. Control the y axis position of a logo by specifying the padding proportion. Default is 4.5% padding.

width_padding

Optional. Control the x axis position of a logo by specifying the padding proportion. Default is 1% padding.

Value

A png image with a logo