Created
April 16, 2020 13:57
-
-
Save jokergoo/ac65ed4061c83fe26a4a3e182c9cb6f9 to your computer and use it in GitHub Desktop.
add asterisks on heatmap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(circlize) | |
library(ComplexHeatmap) | |
mat = matrix(runif(100), 10) | |
col_fun = colorRamp2(c(0, 0.1, 1), c("blue", "white", "red")) | |
Heatmap(mat, col = col_fun, cell_fun = function(j, i, x, y, w, h, fill) { | |
if(mat[i, j] < 0.1) { | |
grid.text("*", x, y) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment