Skip to content

1-D wrap: one strip per panel; legend.title applied again - #28

Merged
fnaji merged 1 commit into
masterfrom
wrap-1d-one-strip
Nov 27, 2026
Merged

fnaji merged 1 commit into
masterfrom
wrap-1d-one-strip

Conversation

@fnaji

@fnaji fnaji commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Two readability bugs seen on the oneday frequency strips (Studio 2026-11-27):

  • Empty strip in a 1-D wrap. With factors on one side only and wrap.1d, the facet was ~ .ri + .ci, so every panel drew an empty strip for the empty side beside its label. It now facets by the populated side only. Strips stay on the left, as before.
  • legend.title never applied. ggplot2 4 fills plt$labels in at build time, so the !is.null(plt$labels$fill/color) checks always failed and legends showed the factor name (s.subject, ds11.median). It is now set with labs(fill =, colour =) in a small helper, with_legend_title.

Unit tests added for both; the whole suite passes in the 1.0.21 image.

🤖 Generated with Claude Code

- wrap.1d with factors on one side only faceted by .ri + .ci, so every panel drew an empty strip
  for the empty side beside its label. It now facets by the populated side only; strips stay left.
- legend.title was never applied: ggplot2 4 fills plt$labels in at build time, so the
  !is.null(plt$labels$fill/color) checks always failed and legends showed the factor name
  (s.subject, ds11.median). Set with labs(fill =, colour =) instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fnaji
fnaji merged commit 9c6b0fe into master Nov 27, 2026
1 check passed
@fnaji
fnaji deleted the wrap-1d-one-strip branch November 27, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant