Reputation:
Does anybody have any clue on how to set different font options (size, style, family, etc.) of labels (x and y) in heatmap.2
. I can manipulate the font size with the cexCol
and cexRow
parameters, but still I don't find any parameter for complete font manipulation.
Any suggestion is highly appreciable.
Upvotes: 1
Views: 8732
Reputation: 263332
This is the code inside heatmap.2 that creates the (main) axis annotation:
axis(1, 1:nc, labels = labCol, las = 2, line = -0.5, tick = 0,
cex.axis = cexCol)
if (!is.null(xlab))
mtext(xlab, side = 1, line = margins[1] - 1.25)
axis(4, iy, labels = labRow, las = 2, line = -0.5, tick = 0,
cex.axis = cexRow)
if (!is.null(ylab))
mtext(ylab, side = 4, line = margins[2] - 1.25)
Once you decide what you want, then hacking that code will get you a specific result. If you want the entire function rewritten, then ..... hire a consultant
Upvotes: 2