Skip to content

Heatmap: heatmap_labels = last (order factor sorts, name labels) - #27

Merged
fnaji merged 1 commit into
masterfrom
heatmap-labels-last
Nov 27, 2026
Merged

fnaji merged 1 commit into
masterfrom
heatmap-labels-last

Conversation

@fnaji

@fnaji fnaji commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

A heatmap ordered by a clustering puts the order factor before the name (rows: hc.rorder, c.antigen; columns: hc.corder, ds5.metacluster_id). The labels joined every factor, so each marker printed as 0\nCD161, and on a dense axis the two lines overlapped (oneday template, Studio 2026-11-27).

  • New heatmap_labels property: all (default, unchanged) or last, which labels each axis with its last factor only. It falls back to all when the last factor alone is not unique.
  • The label logic is a small helper, heatmap_axis_labels, with unit tests in unit_tests/run.R (all pass in the 1.0.20 image).

🤖 Generated with Claude Code

…only

A crosstab that orders a heatmap by a clustering (rows: hc.rorder then the marker; columns:
hc.corder then the population) printed the order number above every name ("0\nCD161"), and on a
dense marker axis the two lines collided. heatmap_labels = "last" keeps the order factor for
sorting but labels with the name; the default "all" keeps today's labels. Falls back to every
factor when the last one alone is not unique.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fnaji
fnaji merged commit 8354039 into master Nov 27, 2026
1 check passed
@fnaji
fnaji deleted the heatmap-labels-last branch November 27, 2026 00:09
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