Skip to content

heatmap question

3 messages · Mark Aquino, David Winsemius

#
Yes I understand what ?<text> means, I meant is it possible to use this function (as an argument) with heatmap.2,  but I learned I can use add.expr=mtext(....) to do that.  However I'm not simply trying to add more text to the graph but rather move the display of the x-axis labels from the bottom of the chart to the top so the output would be more like:

1 2 3 4 5 6
--------------|1 
		   |2
		   |3
		   |4
		   |5
On Jun 2, 2011, at 10:45 PM, David Winsemius wrote:

            
#
On Jun 3, 2011, at 9:26 AM, Mark Aquino wrote:

            
The help page makes me think that repositioning the x-labels (which  
would also require repositioning or suppressing the "upper"  
dendrogram)  would require hacking the function, since it sets up  
specific regions on the page with layout(). You should provide a  
minimal example for other readers, but I'm not going to proceed  
further since it is now clear that you are not just trying to move the  
'xlab' which was how I interpreted your initial problem description.

[ Assuming you have suppressed the column dendrogram, it may be a  
simple as changing the 1 to 3 in this line of code:

  axis(1, 1:nc, labels = labCol, las = 2, line = -0.5, tick = 0,
         cex.axis = cexCol)
....]
#
Brilliant, that's exactly what I needed.  Thank you.  The axis labels are duplicated on top and the bottom now though, but I'm sure there's a way to suppress them from appearing.
On Jun 3, 2011, at 11:24 AM, David Winsemius wrote: