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:
+10
-1
@@ -4,7 +4,11 @@
|
||||
\alias{make_logo_grob}
|
||||
\title{Get a Civilytics Logo grob}
|
||||
\usage{
|
||||
make_logo_grob(type = c("wordmark", "mark"), variant = c("light", "dark"))
|
||||
make_logo_grob(
|
||||
type = c("wordmark", "mark"),
|
||||
variant = c("light", "dark"),
|
||||
position = c("bottom-right", "bottom-left", "top-right", "top-left")
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{type}{Character. `"wordmark"` (default) uses the full wordmark.
|
||||
@@ -13,6 +17,10 @@ make_logo_grob(type = c("wordmark", "mark"), variant = c("light", "dark"))
|
||||
\item{variant}{Character. `"light"` (default) uses the dark logo for light
|
||||
backgrounds. `"dark"` uses the reverse (light) logo for dark backgrounds
|
||||
(pairs with [theme_civilytics_dark()]).}
|
||||
|
||||
\item{position}{Character. Corner placement for the logo: `"bottom-right"`
|
||||
(default), `"bottom-left"`, `"top-right"`, or `"top-left"`. Controls
|
||||
horizontal alignment of the logo grob.}
|
||||
}
|
||||
\value{
|
||||
A ggplot object (class `"gg"`) containing the logo grob.
|
||||
@@ -25,5 +33,6 @@ pipe-friendly [civilytics_logo()].
|
||||
\examples{
|
||||
logo <- make_logo_grob() # wordmark, light
|
||||
logo <- make_logo_grob("mark", "dark") # mark, dark
|
||||
logo <- make_logo_grob(position = "bottom-left") # left-aligned
|
||||
class(logo) # "gg" "ggplot"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user