Learn R Programming

rtemis (version 0.79)

mplot3.heatmap: mplot3 Heatmap (image; modified heatmap)

Description

Customized heatmap with optional colorbar

Usage

mplot3.heatmap(x, colorGrad.n = 101, colorGrad.col = NULL,
  lo = "#18A3AC", lomid = NULL, mid = NULL, midhi = NULL,
  hi = "#F48024", space = "rgb", theme = getOption("rt.theme",
  "light"), colorbar = TRUE, cb.n = 21, cb.title = NULL,
  cb.cex = 1, cb.title.cex = 1, cb.add.mar = NULL, Rowv = NA,
  Colv = if (symm) Rowv else NA, distfun = dist, hclustfun = hclust,
  reorderfun = function(d, w) reorder(d, w), add.expr, symm = FALSE,
  revC = identical(Colv, "Rowv"), scale = "none", na.rm = TRUE,
  margins = NULL, ColSideColors, RowSideColors, cexRow = 0.2 +
  1/log10(nr), cexCol = 0.2 + 1/log10(nc), labRow = NULL,
  labCol = NULL, labCol.las = NULL, main = "", main.adj = 0,
  main.line = NA, xlab = NULL, ylab = NULL, xlab.line = NULL,
  ylab.line = NULL, bg = NULL, col.axis = NULL,
  keep.dendro = FALSE, trace = 0, zlim = NULL, autorange = TRUE,
  filename = NULL, par.reset = TRUE, pdf.width = 7, pdf.height = 7,
  ...)

Arguments

colorGrad.n

Integer. Number of distinct colors to generate using colorGrad

colorGrad.col

Color. See colorGrad

colorbar

Logical. Should colorbar appear next to heatmap?

cb.n

Integer. Number of steps in colorbar. 21 gives 10 above and 10 below midline. If midline is zero, this corresponds to 10 percent increments / decrements

Details

The main difference from the original heatmap is the addition of a colorbar on the side. This is achieved with colorGrad. Other differences: - Dendrograms are not drawn by default. Set Rowv = T and Colv = T to get them. - Column labels are only drawn perpendicular to the x-axis if any one is longer than two characters.