Files
jaredandClaude Opus 4.6 328d9d2fd6
R-CMD-check / R CMD check (push) Successful in 3m37s
feat: add position argument to civilytics_logo() for corner placement
Supports "bottom-right" (default), "bottom-left", "top-right", and
"top-left". The position controls both horizontal alignment of the logo
grob and whether it is placed above or below the plot.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-19 15:44:18 -06:00

37 lines
1.1 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logo.R
\name{add_logo}
\alias{add_logo}
\title{Add a logo to a ggplot2 object}
\usage{
add_logo(
plot,
logo,
margin_param = NULL,
font_scale = 1.1,
position = c("bottom-right", "bottom-left", "top-right", "top-left")
)
}
\arguments{
\item{plot}{a ggplot2 grob}
\item{logo}{a logo grob created by make_logo_grob()}
\item{margin_param}{a numeric specifying what margin to add or subtract to align the logo}
\item{font_scale}{Numeric. Multiplicative scaling factor applied to text
sizes before composing the plot with the logo. Default `1.1` inflates
text by ~10 \% to compensate for the viewport shrinkage caused by
[gridExtra::arrangeGrob()]. Set to `1` to disable.}
\item{position}{Character. Corner placement for the logo: `"bottom-right"`
(default), `"bottom-left"`, `"top-right"`, or `"top-left"`. Controls
whether the logo is placed above or below the plot.}
}
\value{
a grob with a logo attached to it ready to plot
}
\description{
Add a logo to a ggplot2 object
}