Heatmap (underlying computations)

MinutePlot® and R on the same data. MinutePlot version 1.0.0; R 4.5.2.

Dataset

  • iris (scaled numeric columns) — The four iris measurements (R: datasets::iris), standardised per variable (z-scores).
  • Data file (the same format serves MinutePlot and R): iris.csv — one column per variable; paste it into the app, and keep it in the R script’s folder.
  • R built-in: the script uses iris.

Setup

In MinutePlot:

  • Workbench → Heatmap → paste iris.csv → Preview datafirst column is sample names UNticked → group column ticked for Species → Confirm → the run button.
  • Defaults: variables standardised (z-scores), Euclidean distance, Ward linkage.

In R:

  • Base R only; then run iris_clustering.R top to bottom (source it, or paste it into the console) with the R data file in the same folder.
  • R 4.5.2 and the package versions in the page header; each script prints the versions it runs under.

The analysis:

  • Values standardised per variable (mean 0, SD 1, n − 1); Euclidean distance; Ward linkage (MinutePlot’s default; R: hclust(method = “ward.D2”), the variant that matches Ward’s criterion on Euclidean distances).
  • Both the variables (columns) and the samples (rows) are clustered; the tables show the merge order with heights and the leaf order for the variables, and the first five merges of the 150 samples. The heatmap / clustermap itself is MinutePlot’s visualisation layer drawn on top of these validated computations; no figures on this page.
  • What the app shows: the clustered heatmap itself and the two trees -- the leaf ORDER of variables and samples is readable from the figure and matches the order table below. What is internal: the merge heights and the merge table are the engine’s linkage output (the same call that draws the trees) and are not printed in the app; they are validated engine-side against R here and cannot be cross-checked by eye.

Side-by-side results

Variable clustering -- merge order and heights

MinutePlot®

StepJoinsWithHeightSize
1Pet.LPet.W3.32662
2Sep.Lcluster 17.61313
3Sep.Wcluster 223.78344

R

StepJoinsWithHeightSize
1Pet.LPet.W3.32662
2Sep.Lcluster 17.61313
3Sep.Wcluster 223.78344

R values: verified in R 4.5.2 (see the verdict).

Variable leaf order (left to right)

MinutePlot®

Order
Sep.W, Sep.L, Pet.L, Pet.W

R

Order
Sep.W, Sep.L, Pet.L, Pet.W

R values: verified in R 4.5.2 (see the verdict).

Sample clustering -- first five merges

MinutePlot®

StepJoinsWithHeightSize
1s102s1430.00002
2s8s400.12082
3s11s490.12082
4s10s350.13122
5s1s180.13122

R

StepJoinsWithHeightSize
1s102s1430.00002
2s8s400.12082
3s11s490.12082
4s10s350.13122
5s1s180.13122

R values: verified in R 4.5.2 (see the verdict).

Verdict

Variable merge heights (3.3266, 7.6131, 23.7834), the leaf order and the first five sample merges agree with R’s printed hclust(ward.D2) output; variable leaf order identical; no letters in this entry.

R script

iris_clustering.R — each script loads its data, prints its versions and the R-side tables shown above, in page order; no plotting.

R values verified in R 4.5.2 (emmeans 2.0.4, multcomp 1.4-32, multcompView 0.1-12, ez 4.5.0, Hmisc 5.3.0, pls 2.9.0, drc 3.0-1, car 3.1-5) on 16–17 September 2026.