Skip to contents

Save a plot with CORI defaults

Usage

save_plot(
  fig,
  export_path,
  chart_width = 8.888889,
  chart_height = 6.25,
  add_logo = TRUE,
  logo_position = "top right",
  logo_path = "https://rwjf-public.s3.amazonaws.com/Logo-Mark_CORI_Black.svg",
  logo_scale = 20,
  img_scale = 1,
  units = "in",
  background = "white"
)

Arguments

fig

The ggplot2 figure

export_path

file path for the exported plot

chart_width

The width in "in" of the chart

chart_height

The height in "in" of the chart

add_logo

Boolean that determines if a logo is included or not

logo_position

Combination of top/bottom and right/left. Defaults to top right.

logo_path

Path to the logo. Defaults to hosted Full CORI Black logo

logo_scale

Scale logo to 1/logo_scale width of plot

img_scale

Multiplicative scaling factor

units

One of "in", "cm", "mm", or "px"

background

Color of the background in the image export