File:Heatmapcolparam.png: Revision history

Jump to navigation Jump to search

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.

31 January 2025

  • curprev 16:3716:37, 31 January 2025Brb talk contribs 1,243 bytes +1,243 <syntaxhighlight lang='r'> library(ComplexHeatmap) library(circlize) # Create a sample 5x5 matrix with values from -4 to 4 set.seed(123) # for reproducibility example_matrix <- matrix(runif(25, -4, 4), nrow = 5) colnames(example_matrix) <- paste0("Col", 1:5) rownames(example_matrix) <- paste0("Row", 1:5) # Define the color function that truncates at -2 and 2 col_fun <- colorRamp2(c(-2, 0, 2), c("blue", "white", "red")) # Plot the heatmap without truncating the data heatmap1 <- Heatmap(exa...