Hello, I have a large (919 X 919), hierarchically clustered heatmap that I would like to read the labels off of. I have tried saving the figure in pdf format and enlarging it until I can see the labels, but if I make the labels small enough to read (so that they don't overlap) using cexRow and cexCol, they do not appear in the pdf. The limit seems to be anything below cexRow or Col = 0.06. Is there a way to have smaller labels visible in the pdf? Is this an issue with resolution? I could get by with just a quarter of the heatmap (i.e. half of a row and half of a column) so that the labels don't have to be so small, but the heatmap must be clustered before this is done. I tried to cut the dendrogram at just the halfway point of the heatmap, but was not successful. Any suggestions? Thanks, Jacob -- View this message in context: http://r.789695.n4.nabble.com/Reading-labels-for-very-large-heatmaps-tp4644739.html Sent from the R help mailing list archive at Nabble.com.
Jacob, Try increasing the size of the pdf. For example, I can read all 919 labels in this plot ... pdf(width=200, height=200) plot(1:919, 1:919, axes=FALSE) axis(1) axis(2, at=1:919, las=1, cex=0.01) box() graphics.off() Jean JIMonroe <jim5bm@virginia.edu> wrote on 10/01/2012 03:42:24 PM:> > Hello, > I have a large (919 X 919), hierarchically clustered heatmap that Iwould> like to read the labels off of. I have tried saving the figure in pdf > format and enlarging it until I can see the labels, but if I make thelabels> small enough to read (so that they don't overlap) using cexRow andcexCol,> they do not appear in the pdf. The limit seems to be anything belowcexRow> or Col = 0.06. Is there a way to have smaller labels visible in thepdf?> Is this an issue with resolution? I could get by with just a quarter ofthe> heatmap (i.e. half of a row and half of a column) so that the labelsdon't> have to be so small, but the heatmap must be clustered before this isdone.> I tried to cut the dendrogram at just the halfway point of the heatmap,but> was not successful. Any suggestions? > Thanks, > Jacob[[alternative HTML version deleted]]
Jean, It's definitely bigger now, but my axes are cut-off. As in your example, I had them drawn after generating the heatmap, but the image does not seem to be centered. I think even part of the heatmap is getting cut off, which wasn't happening until I explicitly set the width and height of the pdf. Here is my code> pdf("Apo_Mut_Boot.pdf", width=200, height=200) > heatmap(x=as.matrix((Apo_Mut)), col > colorRampPalette(c("white","black"))(256), > zlim=c(min(Apo_Mut),max(Apo_Mut)), add = FALSE, xaxs = "i", yaxs > "i",xaxt= "n", yaxt = "n", xlab="residue", ylab="residue", > main="Apo-Mutant",revC=TRUE, Rowv = as.dendrogram(blah2), Colv > as.dendrogram(blah2), reorderfun = function(d,w) rev(reorder(d,w)), > oldstyle = FALSE,cexRow=0.01,cexCol=0.01,symm=TRUE ) > axis(1, at=1:919, labels=RowCol, las=2, cex=0.01) > axis(4, at=1:919, labels=RowCol, las=2, cex=0.01) > box() > graphics.off()Jacob -- View this message in context: http://r.789695.n4.nabble.com/Reading-labels-for-very-large-heatmaps-tp4644739p4645391.html Sent from the R help mailing list archive at Nabble.com.