This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Missing a row name in Heatmap.2

Hi, I use heatmap.2 (from ggplots) to produce heatmaps. Sometimes I notice that I miss a row name... It could be the first row, but other times it is in the middle.

This is the code

heatmap.2(unitomatrice, scale="row", col=palette, density.info="none", colRow = FALSE, trace="none", distfun = function(x) dist(x,method = 'manhattan'), lhei=c(1, 6), cexCol=0.8, cexRow = 0.5, margins=c(3,7), key.xlab="log2FC", Rowv=NA, dendrogram = "column", labRow =rnames)

I tried to change the cexRow or margin or lhei parameter but without results.

This is an example of what I obtain. As you can see the first row name is missing.heatmap

r ggplots

Search in the forum, there have been similar questions in the previous couple of weeks.

1 answer

seconding Asaf's comment -- most likely you'll simply need to increase the overall size of the figure, e.g.

png(file = "myheatmap.png", height = 1500)
heatmap.2(......)
dev.off()

Log in to answer this question.