Change fontsize name in heatmap.2 function?

I use the package heatmap.2to create a heat map:

heatmap.2(as.matrix(FOOBAR.txt[rowSums (abs(FOOBAR.txt)) != 0,]),
          col=scaleyellowred,
          margins = c(10, 20),
          trace="none",
          xlab = "Comparisons",
          ylab ="gene",
          lhei = c(2, 8),
          scale=c("none"),
          symbreaks=T,
          cexRow=0.5,
          cexCol=.7,
          main="gene comparisons")

The result gives me a warm look that looks like me, and looks good, except that the main font of the header is large. How to reduce header font size? I don't seem to understand. I can change the font of the axis labels, but not the title.

+4
source share
1 answer

heatmap.2 use this operator to print the plot title:

title(main, cex.main = 1.5 * op[["cex.main"]])

So you have to set the argument cex.mainin the list par. For example:

par(cex.main=0.5) ## this will affect also legend title font size
+5
source

All Articles