Jump to content

File:Heatmap-gaps.png: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

7 August 2025

  • curprev 09:3609:36, 7 August 2025 Brb talk contribs 2,066 bytes +1,234 Summary
  • curprev 09:1709:17, 7 August 2025 Brb talk contribs 832 bytes +832 <syntaxhighlight lang='r'> # 1. Prepare the data set.seed(42) mat = matrix(rnorm(30, mean = 0, sd = 1.2), nrow = 5, ncol = 6) mat[2, 1] = -2.5 mat[2, 6] = 2.5 mat[1, 2] = -1.8 mat[4, 4] = 1.8 # 2. Define the color palette library(circlize) col_fun = colorRamp2(c(-2.5, 0, 2.5), c("steelblue", "white", "darkred")) # 3. Create the heatmap object library(ComplexHeatmap) ht = Heatmap( mat, col = col_fun, cluster_rows = FALSE, cluster_columns = FALSE, show_row_names = FALSE, show_colu...