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 data → first 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.Rtop 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®
| Step | Joins | With | Height | Size |
|---|---|---|---|---|
| 1 | Pet.L | Pet.W | 3.3266 | 2 |
| 2 | Sep.L | cluster 1 | 7.6131 | 3 |
| 3 | Sep.W | cluster 2 | 23.7834 | 4 |
R
| Step | Joins | With | Height | Size |
|---|---|---|---|---|
| 1 | Pet.L | Pet.W | 3.3266 | 2 |
| 2 | Sep.L | cluster 1 | 7.6131 | 3 |
| 3 | Sep.W | cluster 2 | 23.7834 | 4 |
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®
| Step | Joins | With | Height | Size |
|---|---|---|---|---|
| 1 | s102 | s143 | 0.0000 | 2 |
| 2 | s8 | s40 | 0.1208 | 2 |
| 3 | s11 | s49 | 0.1208 | 2 |
| 4 | s10 | s35 | 0.1312 | 2 |
| 5 | s1 | s18 | 0.1312 | 2 |
R
| Step | Joins | With | Height | Size |
|---|---|---|---|---|
| 1 | s102 | s143 | 0.0000 | 2 |
| 2 | s8 | s40 | 0.1208 | 2 |
| 3 | s11 | s49 | 0.1208 | 2 |
| 4 | s10 | s35 | 0.1312 | 2 |
| 5 | s1 | s18 | 0.1312 | 2 |
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.