Skip to content

recording: heatmap_histogram (statistical items, guided tour)#18

Merged
borisbat merged 1 commit into
masterfrom
bbatkin/heatmap-histogram-recording
Jun 7, 2026
Merged

recording: heatmap_histogram (statistical items, guided tour)#18
borisbat merged 1 commit into
masterfrom
bbatkin/heatmap-histogram-recording

Conversation

@borisbat

@borisbat borisbat commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Third of the four display-tour recordings. heatmap_histogram covers the two statistical / 2D items side by side:

  • HEAT (left) — plot_heatmap maps a rows × cols row-major grid through the active colormap.
  • HIST (right) — histogram bins a flat sample array into a 1D distribution (bin count picked automatically from the sample size via ImPlotBin.Sturges).

No interaction to teach beyond the shapes — and colormap scaling belongs to colormaps_and_style — so this is a guided tour: the cursor sweeps diagonally across the heatmap grid (each cell colored by its value, so the data structure reads as a pattern of colors), then glides to the histogram. It is REAL synthetic input and self-verifying — both plots must render at every beat and the synthetic cursor must actually land hovered over the heatmap grid (not just drawn), so a dead frame or a missed cursor aborts at teardown.

The beat-2 narration describes what's on screen — a pattern of colors from the default qualitative colormap — rather than implying a smooth low→high ramp the default palette doesn't show; the sequential-colormap case is colormaps_and_style's job (with a forward link added in the rst).

Files

  • tests/integration/record_heatmap_histogram.das — the voiced driver (intro both plots + trace the heatmap grid + point at the histogram).
  • doc/source/tutorials/heatmap_histogram.rst+ .. video:: heatmap_histogram.mp4 and a Walkthrough section.
  • doc/source/_static/tutorials/heatmap_histogram.mp4 — the recording (745 KB, 32.3s, 877 frames, 0 dropped, Emma voice + −16 dB bed).

The headless guard is the existing test_heatmap_histogram.das.

🤖 Generated with Claude Code

Third of the four display-tour recordings. heatmap_histogram covers the two statistical /
2D items side by side: a HEAT plot (plot_heatmap maps a rows x cols grid through the active
colormap) and a HIST plot (histogram bins a flat sample array into a 1D distribution).

No interaction to teach here beyond the shapes - and colormap scaling belongs to
colormaps_and_style - so this is a guided tour: the cursor sweeps diagonally across the
heatmap grid (each cell colored by its value, so the data structure reads as a pattern of
colors), then glides to the histogram (a count per bin, bin count picked automatically).
REAL synthetic input and self-verifying: both plots must render at every beat AND the
cursor must actually land hovered over the heatmap grid (not just drawn), so a dead frame
or a missed cursor aborts at teardown.

The beat-2 voice describes what is on screen - a pattern of colors from the default
qualitative colormap - rather than implying a smooth low-to-high ramp, which the default
palette does not show; the sequential-colormap case is colormaps_and_style's job.

- tests/integration/record_heatmap_histogram.das: the voiced driver (intro both plots +
  trace the heatmap grid + point at the histogram).
- doc/source/tutorials/heatmap_histogram.rst: + .. video:: heatmap_histogram.mp4 and a
  Walkthrough section, with a forward link to colormaps_and_style for sequential maps.
- doc/source/_static/tutorials/heatmap_histogram.mp4: the recording (745 KB, 32.3s, 877
  frames, 0 dropped, Emma voice + -16 dB bed).

The headless guard is the existing test_heatmap_histogram.das.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the third “display-tour” recording for the heatmap_histogram tutorial, along with the documentation walkthrough and embedded video asset so the tutorial page includes an inline guided tour.

Changes:

  • Add a new integration recording driver that narrates and cursor-sweeps the heatmap then moves to the histogram, with self-verification gates (rendered + hovered).
  • Add a Walkthrough section to the tutorial rst embedding the new heatmap_histogram.mp4 and describing what the viewer is seeing.
  • Add the heatmap_histogram.mp4 static tutorial video asset.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/integration/record_heatmap_histogram.das New voiced, self-verifying recording driver for the heatmap+histogram guided tour.
doc/source/tutorials/heatmap_histogram.rst Adds Walkthrough section + .. video:: heatmap_histogram.mp4 embed and explanatory text.
doc/source/_static/tutorials/heatmap_histogram.mp4 Adds the rendered walkthrough video asset used by the docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to +18
//! glides to the histogram while the voice names each item. Self-verifying with REAL synth
//! input: both plots must render at every beat, and the cursor must actually land hovered
//! over the heatmap grid, so a dead frame or a missed cursor aborts at teardown. The
let d_heat = say_begin(app, "a heatmap colors a grid by value", HEAT,
[voice = "The heatmap draws a rows by columns grid, and each cell takes its color from its value through the active colormap, so the structure in the data shows up as a pattern of colors."])
let t_heat = ref_time_ticks()
// Glide diagonally across the grid so the cursor sweeps the gradient.
@borisbat borisbat merged commit e624422 into master Jun 7, 2026
6 checks passed
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.

2 participants