R-CMD-check / R CMD check (push) Successful in 2m39s
- Replace old civilytics_logo.png/white.png/jpg/pdf with new rebrand
assets: civilytics-wordmark.png, civilytics-wordmark-reverse.png,
civilytics-mark.png, civilytics-mark-reverse.png (all transparent bg)
- make_logo_grob() now accepts type = c("wordmark", "mark") alongside
variant = c("light", "dark") for 4 combinations
- New civilytics_logo() pipe-friendly convenience function:
ggplot(df, aes(x, y)) + geom_point() + theme_civilytics() |>
civilytics_logo()
R's |> has lower precedence than +, so the full ggplot chain pipes
through without parentheses
- Remove old icon/favicon assets no longer used
- Wrap showtext-dependent examples in \dontrun{} to prevent R CMD check
failures in headless PostScript environments
30 lines
1003 B
R
30 lines
1003 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/logo.R
|
|
\name{make_logo_grob}
|
|
\alias{make_logo_grob}
|
|
\title{Get a Civilytics Logo grob}
|
|
\usage{
|
|
make_logo_grob(type = c("wordmark", "mark"), variant = c("light", "dark"))
|
|
}
|
|
\arguments{
|
|
\item{type}{Character. `"wordmark"` (default) uses the full wordmark.
|
|
`"mark"` uses the compact C-pulse icon only.}
|
|
|
|
\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()]).}
|
|
}
|
|
\value{
|
|
A ggplot object (class `"gg"`) containing the logo grob.
|
|
}
|
|
\description{
|
|
Returns a ggplot object containing the Civilytics logo as a rasterGrob,
|
|
ready to compose with plots via [add_logo()], [add_logo_ga()], or the
|
|
pipe-friendly [civilytics_logo()].
|
|
}
|
|
\examples{
|
|
logo <- make_logo_grob() # wordmark, light
|
|
logo <- make_logo_grob("mark", "dark") # mark, dark
|
|
class(logo) # "gg" "ggplot"
|
|
}
|