Increasing row height in R heatmap() function

Viewed 16621

I have a matrix with hundreds of rows and tens of columns and wish to plot a heatmap. If I use the native R function:

heatmap(matrix(sample(1:10000),nrow=1000,ncol=10))

I get a figure with illegible row titles. I assume the image is produced to match the specifications of the current plotting device. I'd like control over the height of the rows, even if this can't be displayed on my current device. Simply writing to a tall PNG just adds whitespace above/below the image:

png( '/looks_the_same_with_whitespace.png', width=500, height=1500)
heatmap(matrix(sample(1:10000),nrow=1000,ncol=10))
dev.off()

Is there a clean way to do this, perhaps by fooling R into thinking I have a very tall monitor? A function from a well-supported library is also a fine answer.

1 Answers
Related