Skip to content

Add hc.rect.col to set the cluster-rectangle outline color#97

Merged
kassambara merged 1 commit into
masterfrom
feat/hc-rect-col
Jul 9, 2026
Merged

Add hc.rect.col to set the cluster-rectangle outline color#97
kassambara merged 1 commit into
masterfrom
feat/hc-rect-col

Conversation

@kassambara

Copy link
Copy Markdown
Owner

The hc.rect cluster rectangles were drawn with a hardcoded gray30 outline, so there was no way to recolor them short of adding your own annotate("rect", ...) (which means recomputing the cluster bounds by hand).

New hc.rect.col argument sets that outline color:

ggcorrplot(corr, hc.order = TRUE, hc.rect = 3, hc.rect.col = "white")   # or "black", etc.
  • Default "gray30"every existing call is byte-identical (64/64 combinations verified vs origin/master); an explicit hc.rect.col = "gray30" reproduces the previous output exactly.
  • Inert when hc.rect is not set (no rectangle layer).
  • Structural tests pin the default, the applied color, and the no-op-when-unused behavior. R CMD check --as-cran clean.

Requested by the maintainer for cluster-box readability.

The hc.rect cluster rectangles were drawn with a hardcoded gray30 outline. Add
an hc.rect.col argument (default "gray30", so existing output is byte-identical)
so the outline color can be chosen, e.g. hc.rect.col = "white" or "black" to suit
the palette. Only used when hc.rect is set.
@kassambara kassambara merged commit 9d3b1c8 into master Jul 9, 2026
5 checks passed
@kassambara kassambara deleted the feat/hc-rect-col branch July 9, 2026 12: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