Skip to content

Add a preset argument for publication-grade output in one token#95

Merged
kassambara merged 1 commit into
masterfrom
feat/preset
Jul 9, 2026
Merged

Add a preset argument for publication-grade output in one token#95
kassambara merged 1 commit into
masterfrom
feat/preset

Conversation

@kassambara

Copy link
Copy Markdown
Owner

New preset argument bundles publication-grade defaults into a single token:

ggcorrplot(corr, preset = "publication")   # white outlines + colorblind-safe RdBu

preset = "publication" sets white cell outlines and the "RdBu" palette. It fills only the arguments you did not supply — detected with missing() before any reassignment — so an explicit outline.color, colors, or palette always overrides the preset. It reuses the same internal palette constant as palette=.

  • Default preset = NULLevery existing call is byte-identical (64/64 combinations verified vs origin/master).
  • Precedence proven by structural tests: explicit outline.color → honored; explicit colors → the preset does not swap in RdBu; explicit palette → honored; unknown preset errors.
  • R CMD check --as-cran clean (no warnings; codoc OK).

New preset argument bundles publication-grade defaults: preset = "publication"
sets white cell outlines and the colorblind-safe RdBu palette in a single token.
It fills only the arguments the caller did not supply (detected with missing()
before any reassignment), so an explicit outline.color, colors, or palette always
overrides the preset. Defaults to NULL, leaving every existing call byte-identical.
@kassambara kassambara merged commit f170900 into master Jul 9, 2026
5 checks passed
@kassambara kassambara deleted the feat/preset branch July 9, 2026 10:24
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