add_logo_ga() still pulls plots down with negative margins #28

Closed
opened 2026-10-15 15:34:05 -04:00 by jared · 0 comments
Owner

add_logo_ga() (several plots plus one logo) still uses a negative bottom margin, -7 * sqrt(caption lines) points, to tuck the logo under captions. That is the same approach that clipped captions in add_logo() (#20), and it depends on text size and whether showtext is active.

Fix: reserve a band for the logo, as add_logo() now does with logo_height, and drop the negative margin. Also stop sizing the plot area as heights = c(0.93, 0.07); use the same null plus inches layout.

Done when: a caption on any of the plots has zero ink in the bottom two pixel rows at 300 dpi, at 8 to 24 inches wide, with a test that fails on the old code. Needs a NEWS.md entry under Bug fixes.

`add_logo_ga()` (several plots plus one logo) still uses a negative bottom margin, `-7 * sqrt(caption lines)` points, to tuck the logo under captions. That is the same approach that clipped captions in `add_logo()` (#20), and it depends on text size and whether showtext is active. **Fix:** reserve a band for the logo, as `add_logo()` now does with `logo_height`, and drop the negative margin. Also stop sizing the plot area as `heights = c(0.93, 0.07)`; use the same `null` plus inches layout. **Done when:** a caption on any of the plots has zero ink in the bottom two pixel rows at 300 dpi, at 8 to 24 inches wide, with a test that fails on the old code. Needs a `NEWS.md` entry under **Bug fixes**.
jared added the
ws
logo
type
defect
labels 2026-10-15 15:34:05 -04:00
jared closed this issue 2026-10-15 15:39:46 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Civilytics/civilyticsR#28