Skip to content

Import ggplot2 theme_void in createLinePlots - #152

Merged
flohump merged 1 commit into
pik-piam:masterfrom
flohump:fix-theme-void-import
Sep 16, 2026
Merged

flohump merged 1 commit into
pik-piam:masterfrom
flohump:fix-theme-void-import

Conversation

@flohump

@flohump flohump commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Purpose

createLinePlots() draws an empty placeholder plot (ggplot() + theme_void()) for scenarios with no data (R/showLinePlots.R:156,198), but theme_void was never added to the ggplot2 imports (the NAMESPACE has theme, theme_bw, theme_minimal, but not theme_void). Under R CMD check, where ggplot2 is not attached, the bare call fails:

Error in `theme_void()`: could not find function "theme_void"

This breaks R CMD check for any package that tests a mip line plot with a missing-data scenario. It surfaced in pik-piam/piamInterfaces CI (test-plotIntercomparison), but it is not specific to that package. Introduced in de3133c ("Minor performance tweaks").

Change

Add @importFrom ggplot2 theme_void to createLinePlots; buildLibrary adds the matching NAMESPACE entry. One-line fix, tests pass.

createLinePlots draws an empty placeholder plot (ggplot() + theme_void()) for
scenarios with no data, but theme_void was never imported, so the call failed
with "could not find function theme_void" under R CMD check, where ggplot2 is
not attached. Add the missing @importFrom.
@flohump
flohump marked this pull request as ready for review September 16, 2026 19:09
@flohump
flohump merged commit 8f8e67d into pik-piam:master Sep 16, 2026
2 checks passed
@flohump
flohump deleted the fix-theme-void-import branch September 16, 2026 19:12
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