![](../logo.png)
Add CORI logo to ggplot figure in an SVG-friendly way, then export
Source:R/export.R
save_with_logo_svg.Rd
Specialty function for adding a CORI logo to a ggplot figure in a way that can be exported as an SVG. You MUST set clip to "off" in a coordinate function for this function to work.
Usage
save_with_logo_svg(
fig,
export_path,
logo_path = "https://rwjf-public.s3.amazonaws.com/Logo-Mark_CORI_Black.svg",
x_pos_scale = 0.9975,
y_pos_scale = 1.195,
chart_width = 8.888889,
chart_height = 6.25,
units = "in",
img_scale = 1,
background = "white"
)
Arguments
- fig
ggplot2 figure
- export_path
file path for the exported plot
- logo_path
Path to the logo. Defaults to hosted Full CORI Black logo
- x_pos_scale
Position scale factor as a percentage of x range
- y_pos_scale
Position scale factor as a percentage of the y range
- chart_width
The width in "in" of the chart
- chart_height
The height in "in" of the chart
- units
One of "in", "cm", "mm", or "px"
- img_scale
= Multiplicative scaling factor
- background
Color of the background in the image export