Skip to content

Add scale.square to size squares by correlation magnitude#99

Merged
kassambara merged 2 commits into
masterfrom
feat/scale-square
Jul 9, 2026
Merged

Add scale.square to size squares by correlation magnitude#99
kassambara merged 2 commits into
masterfrom
feat/scale-square

Conversation

@kassambara

@kassambara kassambara commented Jul 9, 2026

Copy link
Copy Markdown
Owner

New scale.square argument (default FALSE, appended at the end of the signature). When TRUE with method = "square", the squares are sized by the absolute correlation (larger square = stronger), in addition to the fill color, mirroring the sized-circle glyph (a shape = 22 point that honors size, reusing circle.scale and the existing abs_corr).

ggcorrplot(corr, scale.square = TRUE, hc.order = TRUE)
  • Default FALSE keeps method = "square" a constant full-cell tile — every existing call is byte-identical (64/64 combinations verified vs origin/master; explicit scale.square = FALSE reproduces the default exactly).
  • Chosen as a new argument (not a new method value) so method's partial-matching is untouched — method="s"/"c" still resolve as before; no existing argument starts with "scale", so no abbreviation clash.
  • Has no effect for method = "circle" (circles are always sized); also sizes a "square" region in the mixed layout.
  • Structural tests + vdiffr snapshot; a gallery-vignette entry; R CMD check --as-cran clean (codoc + vignette OK). No new dependency.

New scale.square argument: when TRUE with method = "square", the squares are
sized by the absolute correlation (larger square = stronger), on top of the fill
color -- the classic corrplot size-scaled square look, mirroring the sized-circle
glyph. Default FALSE keeps method = "square" a constant full-cell tile, so every
existing call is byte-identical. Has no effect for method = "circle".
Reword the gallery vignette (near-zero squares shrink to small squares, not away
- scale_size starts at 4) and note in @param that coefficient labels are drawn at
full size and may overflow the smallest squares, as with method = "circle".
@kassambara kassambara merged commit bf29fbc into master Jul 9, 2026
5 checks passed
@kassambara kassambara deleted the feat/scale-square branch July 9, 2026 20:14
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