Entering edit mode
13 months ago
dylannicoembros
•
0
I am having trouble with the font size of a complex heatmap. I created it as follow:
l2_val <- as.matrix(genes$log2FoldChange)
h2 <- Heatmap(l2_val,row_km = 10,row_names_gp = gpar(fontsize = 5),row_labels = genes$external_gene_name,
cluster_rows = F, name="logFC", top_annotation = ha, col = col_logFC,
cell_fun = function(j, i, x, y, w, h, col) { # add text to each grid
grid.text(round(l2_val[i, j],2), x, y)
})
The result is the following:
How can I make the numbers smaller, so that they can fit in the cells?