I used the following code:
library("gplots")
heatmap.2(assay(vsd)[ens_union,], trace = "none", density.info = "none")
To produce the following heatmap:
As you can see, the row labels have been cut-off (the first one should, for instance, be ENSMUSG00000000088
, but only ENSMUSG0
is displayed). How can I re-size the plot to include the whole labels?
Just add the margins
argument
library("gplots")
# generate some example data
data <- as.matrix(mtcars)
# make ridiculously long names
long.names <- paste("ENSMUSG000000000", rownames(mtcars))
rownames(data) <- long.names
# GO!
heatmap.2(data, trace = "none", density.info = "none",
margins = c(8, 16))
Don't forget you can also change the font size if you like with cexRow