Reputation: 117
I used the R code below to obtain a heatmap of some data;the heatmap displays a dendrogram at the top of the columns, but I would rather have the dendrogram to be shorter in length, so as to have enough space left at the bottom of the heatmap for some long column labels. Is there any way to tweak the lengths of dendrograms?
<- heatmap.2(t(mully), scale="none", Rowv=F,
col = myCol,
breaks = myBreaks,
dendrogram="row",
margins=c(0.55,8.4), cexRow=0.68, cexCol=0.9, key=FALSE,
labCol =NULL,
trace="none")
I would be happy to get some help.
James
Upvotes: 1
Views: 1853
Reputation: 739
You can try pheatmap
package for drawing the heatmap.
pheatmap(t(mully), colors = myCol, breaks = myBreaks)
If the matrix is too big to fit properly into the plotting window, then you can fix cell heights and widths and write the result into a file. This ensures that all the relevant parts of the plot will be visible.
pheatmap(t(mully), colors = myCol, breaks = myBreaks, cellheight = 10,
cellwidth = 10, filename = "example.png")
Upvotes: 2