fix(logo): reserve a logo band, keep patchwork panels, and preserve logo aspect (#20)

The logo gets its own band (logo_height inches) instead of negative
margins, so captions are no longer clipped. Patchwork compositions go
through patchworkGrob() so every panel survives. font_scale defaults to 1.
make_logo_grob() sizes by height so the logo keeps its shape on any canvas.

Closes #20

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jaredandClaude Sonnet 5.5 committed 2026-10-15 15:27:55 -04:00
1 parent d6e3ba2fb4
commit 0561df4221
6 files changed
+171 -72

No files matched your search

+7 -4
View File
@@ -10,7 +10,8 @@ civilytics_logo(
variant = c("light", "dark"),
position = c("bottom-right", "bottom-left", "top-right", "top-left"),
margin_param = NULL,
font_scale = 1.1
font_scale = 1,
logo_height = 0.5
)
}
\arguments{
@@ -28,9 +29,11 @@ civilytics_logo(
\item{margin_param}{Numeric or `NULL`. Manual margin adjustment passed to
[add_logo()].}
\item{font_scale}{Numeric. Inflate text sizes by this factor to compensate
for viewport shrinkage when composing with [gridExtra::arrangeGrob()].
Default `1.1` (~10 \% inflation). Set to `1` to disable.}
\item{font_scale}{Numeric. Multiplies the plot's base text size before
composing. Default `1` leaves typography unchanged.}
\item{logo_height}{Numeric. Height in inches of the band reserved for the
logo. Default `0.5`.}
}
\value{
A grob (from [gridExtra::arrangeGrob()]) ready to draw with