R-CMD-check / R CMD check (push) Failing after 1m39s
- R/colors.R: civilytics_colors named vector (from --cv-* CSS vars on civilytics.com), three palettes (main/sequential/diverging), scale_color_civilytics() and scale_fill_civilytics() for ggplot2 - R/fonts.R: auto-loads Inter + Libre Franklin from Google Fonts via showtext in .onLoad(); exports civilytics_load_fonts() for manual retry - R/theme.R: wires ggplot2 4.0 ink/paper/accent params into theme_grey() base, adds title_family + strip_color params; new theme_civilytics_dark() using navy_dark background and warm off-white text - R/logo.R: make_logo_grob(variant) accepts "light"/"dark" to select the white logo for dark-background compositions - DESCRIPTION: adds showtext, sysfonts; pins ggplot2 >= 4.0.0 - tests/testthat/test_theme.R: full test suite for colors, palettes, scales, both theme variants, and logo grob variants
39 lines
1.1 KiB
R
39 lines
1.1 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/logo.R
|
|
\name{add_logo_ga}
|
|
\alias{add_logo_ga}
|
|
\title{Add a logo to a ggplot2 object}
|
|
\usage{
|
|
add_logo_ga(plot_list, logo, nrow = 1, widths = NULL, margin_param = NULL)
|
|
}
|
|
\arguments{
|
|
\item{plot_list}{a list containing ggplot2 objects}
|
|
|
|
\item{logo}{a grob containing the logo created with `make_logo_grob`}
|
|
|
|
\item{nrow}{an integer, default = 1, for the number of rows to align the plots in}
|
|
|
|
\item{widths}{an optional vector the same length as plot_list with the widths for each plot}
|
|
|
|
\item{margin_param}{a number giving the adjustment up or down to help manually align logo and captions}
|
|
}
|
|
\value{
|
|
a grid object
|
|
}
|
|
\description{
|
|
Add a logo to a ggplot2 object
|
|
}
|
|
\note{
|
|
The resulting object needs to be drawn to the screen using grid.draw()
|
|
}
|
|
\examples{
|
|
\dontrun{
|
|
library(ggplot2); library(grid)
|
|
tmp_plot <- ggplot(mtcars) + aes(x = hp, y = disp) + geom_point() + theme_civilytics()
|
|
tmp_logo <- make_logo_grob()
|
|
plot_and_logo <- add_logo(tmp_plot, tmp_logo)
|
|
grid.draw(plot_and_logo)
|
|
dev.off()
|
|
}
|
|
}
|