feat: add position argument to civilytics_logo() for corner placement
R-CMD-check / R CMD check (push) Successful in 3m37s
R-CMD-check / R CMD check (push) Successful in 3m37s
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>
This commit is contained in:
+11
-1
@@ -4,7 +4,13 @@
|
||||
\alias{add_logo}
|
||||
\title{Add a logo to a ggplot2 object}
|
||||
\usage{
|
||||
add_logo(plot, logo, margin_param = NULL, font_scale = 1.1)
|
||||
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}
|
||||
@@ -17,6 +23,10 @@ add_logo(plot, logo, margin_param = NULL, font_scale = 1.1)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user